-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 999 Bytes
/
deploy.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
name: Deploy
on: [push]
env:
CI: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
NODE_ENV: development
jobs:
build-and-deploy:
defaults:
run:
working-directory: webapp
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install
run: |
npm config set legacy-peer-deps true
npm install
- name: Test ✅
if: github.ref != 'refs/heads/main'
run: npm run test
- name: Coverage ✅
if: github.ref == 'refs/heads/main'
env:
COVERALLS_FLAG_NAME: webapp
run: npm run coveralls
- name: Build 🔧
env:
NODE_ENV: production
PUBLIC_PATH: /github-analytics
run: npm run build
- name: Deploy 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: webapp/dist