-
-
Notifications
You must be signed in to change notification settings - Fork 10
30 lines (28 loc) · 918 Bytes
/
docs-publish.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
name: Generate Docs
on:
pull_request:
branches: [main]
types: [closed]
jobs:
docs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- run: npm install
- name: Generate Docs
run: npm run docs
- name: Commit Docs
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Automated Documentation Generation"
git push