-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (40 loc) · 1 KB
/
build.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: Build Gist Web
run-name: Build gist-web - ${{ github.event.commits[0].message }}
on:
push:
branches:
- 'develop'
- 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 16
- name: Build
shell: bash
run: |
npm install
npm run build:prod
- name: Commit any changes
shell: bash
run: |
git config user.name "ami-ci"
git config user.email "<>"
git add .
set +e # Grep succeeds with nonzero exit codes to show results.
git status | grep modified
if [ $? -eq 0 ]
then
set -e
git commit -am "New version of gist-web"
git push
else
set -e
echo "No changes since last run"
fi