-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (35 loc) · 1.02 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "12"
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: node_modules-${{ hashFiles('package-lock.json') }}
- name: Cache elm
uses: actions/cache@v1
with:
path: ~/.elm
key: elm-${{ hashFiles('elm.json') }}
- name: Run workflow
run: |
test -d node_modules || npm ci
npm test
npm run build
env:
CI: true
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: example/build # The folder the action should deploy.