Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 5292a82

Browse files
authored
Merge pull request #318 from FileFighter/feature/Documentation-Workflow
Create documentation.yml
2 parents 6512f59 + 4b5956c commit 5292a82

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- 'src/**'
8+
9+
jobs:
10+
Generate_Documentation:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Set up Project
14+
uses: actions/checkout@v2
15+
- name: Set up Node.js environment
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: 16
19+
cache: 'yarn'
20+
- name: Checkout docs branch and hardsync with master
21+
run: |
22+
git checkout gh-pages 2>/dev/null || git checkout -b gh-pages
23+
git reset --hard master
24+
- name: Setup yarn
25+
run: |
26+
yarn install --immutable --immutable-cache --check-cache
27+
- name: Generate Documentation
28+
run: yarn docs
29+
- name: setup git config
30+
run: |
31+
git config user.name "GitHub Actions Bot"
32+
git config user.email "<>"
33+
- name: Commit
34+
run: |
35+
TIMESTAMP=`date +%s`
36+
git add docs
37+
git commit -m "Generated docs: $TIMESTAMP"
38+
- name: Push
39+
run: git push -f -u origin gh-pages

0 commit comments

Comments
 (0)