-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (32 loc) · 991 Bytes
/
doc.yaml
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
name: Generate Doc
on:
push:
branches: [main]
defaults:
run:
shell: bash
jobs:
Doc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
- name: Install dependencies
run: npm install
- name: Create Doc
run: npm run doc
- name: Push Doc
run: |
BRANCH=gh-pages
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git fetch origin $BRANCH
git reset --mixed origin/$BRANCH
git add -f docs
git commit -m "Updating documentation: $GITHUB_ACTOR"
git push origin HEAD:$BRANCH