-
Notifications
You must be signed in to change notification settings - Fork 368
40 lines (29 loc) · 913 Bytes
/
documentation.yml
File metadata and controls
40 lines (29 loc) · 913 Bytes
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: Documentation
# Controls when the action will run.
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: documentation
- name: Checkout and install the master
run: |
git reset --hard origin/master
npm install
- name: Generate the document
run: npm run document
- name: Create a commit with the document
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add -f docs
git commit -m 'Add documentation'
- name: Update the documentation branch
run: git push -f origin documentation