-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (42 loc) · 1.23 KB
/
onpush.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
name: Build Pipeline
on: push
jobs:
build-demo:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "12"
- uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: borales/actions-yarn@v2.0.0
with:
cmd: install
- name: Install graphicsmagick
run: |
sudo apt-get update
sudo apt-get install graphicsmagick
- name: Build demo docs
run: bash scripts/build-demo.sh
- name: Commit files
run: |
git diff
CHANGED=$(git diff-index HEAD --)
if [ -z "$CHANGED" ]; then
echo "Nothing has changed"
exit 0
fi
EMAIL=$(git show -s --format='%ae' `git rev-parse HEAD`)
NAME=$(git show -s --format='%an' `git rev-parse HEAD`)
git config --global init.defaultBranch main
git config --local user.email "$EMAIL"
git config --local user.name "$NAME"
git add docs/
git commit -m "Update docs"
git push
shell: bash