-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (47 loc) · 1.59 KB
/
master-merge.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Doc Build on Merge to `master`
# Controls when the action will run. Triggers the workflow on push
# events but only for the master branch
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
path: ''
- uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Collect READMEs for Wiki
run: node ./scripts/actions/collect-wiki.js
# from: https://github.com/marketplace/actions/wiki-page-creator-action
- name: Upload READMEs to Wiki
uses: docker://decathlon/wiki-page-creator-action:latest
env:
ACTION_MAIL: devlin.junker@gmail.com
ACTION_NAME: devlinjunker
GH_PAT: ${{ secrets.GH_PAT }}
MD_FOLDER: "./wiki"
OWNER: devlinjunker
REPO_NAME: template.webpack.fend
SKIP_MD: README.md
- name: Generate Demo and Docs
run: |
npm install -D
npm run doc
- name: Commit Demo and Docs
run: |
git config --local user.email "devlinjunker@gmail.com"
git config --local user.name "GitHub Action"
git add docs
git commit -m "Docsite and Demo Build on Push to Master"
- name: Push changes to Docs
uses: ad-m/github-push-action@master
with:
# Have to do this trickery because action requires GITHUB_TOKEN (I've been using GH_PAT on my account)
github_token: ${{ secrets.GITHUB_TOKEN }}${{ secrets.GH_PAT }}
force: true
branch: master