-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 984 Bytes
/
generate-pages.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
name: generate-pages
on:
push:
paths-ignore:
- 'docs/**'
jobs:
convert-to-html:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm ci
- name: Run conversion script
run: npm run start
- name: Set up git
run: |
git config --local user.name ${{ github.actor }}
git add ./docs
- name: Check for updated files
shell: bash
run: |
echo 'GIT_STATUS<<EOF' >> $GITHUB_ENV
git status >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Commit files
if: contains(env.GIT_STATUS, 'Changes to be committed')
run: git commit -m "Autogenerate converted pages"
- name: Push changes
if: contains(env.GIT_STATUS, 'Changes to be committed')
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true