forked from jmbyun/research-group-static-web
-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (41 loc) · 1.09 KB
/
builder.yml
File metadata and controls
46 lines (41 loc) · 1.09 KB
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
name: Builder
on:
push:
branches:
- master
schedule:
- cron: "0/30 * * * *"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Build the website with the latest contents
uses: ./action-build
with:
API_KEY: ${{ secrets.API_KEY }}
- name: Commit changed files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/\*
set +e
git status | grep 'modified\|new file'
if [ $? -eq 0 ]
then
set -e
git commit -am "build the website with the latest source data - $(date)"
else
set -e
echo "No changes since last run"
fi
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}