-
Notifications
You must be signed in to change notification settings - Fork 91
34 lines (27 loc) · 852 Bytes
/
build.yaml
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
---
on: [push, pull_request]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Setup Git
if: github.event_name == 'push' && github.ref_name == 'main'
uses: fregante/setup-git-user@v1
- name: Commit/push if there is a diff
if: github.event_name == 'push' && github.ref_name == 'main'
run: |
if ! git diff --exit-code; then
git add .
git commit -m "chore: compile and lint $GITHUB_SHA [ci skip]"
git push origin main
fi