-
Notifications
You must be signed in to change notification settings - Fork 28
40 lines (32 loc) · 895 Bytes
/
docs.yml
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
name: Update Docs
on:
push:
branches:
- master
jobs:
UpdateDocs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Generate docs
run: |
mkdir tmp
npm run docgen
mv ./master.json tmp/master.json
- name: Switch to docs branch
run: |
git fetch --all
git checkout docs --
- name: Replace master.json in docs branch
run: |
rm master.json
mv tmp/master.json master.json
- name: Commit and push changes
run: |
git config --global user.name "Docs Updater[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "Update Docs"
git push origin docs