-
-
Notifications
You must be signed in to change notification settings - Fork 18
51 lines (42 loc) · 1.33 KB
/
Copy pathwiki.yml
File metadata and controls
51 lines (42 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Update Wiki
on:
push:
branches:
- main
jobs:
update-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout Canopy repo
uses: actions/checkout@v4
- name: Checkout Wiki repo (master branch)
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: wiki
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Commands.md template from template branch
working-directory: wiki
run: git fetch origin template && git show origin/template:Commands.md > Commands.md
- name: Use Node.js 20.14.0
uses: actions/setup-node@v4
with:
node-version: 20.14.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Generate wiki content
run: WIKI_PATH=./wiki npm run generate-wiki
- name: Commit and push wiki changes
working-directory: wiki
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No wiki changes to commit."
else
git commit -m "docs: auto-update wiki from source [skip ci]"
git push
fi