-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (43 loc) · 1.12 KB
/
test-and-deploy.yml
File metadata and controls
52 lines (43 loc) · 1.12 KB
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
49
50
51
52
name: Run tests and deploy to GitHub pages if successful
on:
push:
branches:
- main
jobs:
run-unit-tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install and run unit tests 🔧
run: |
npm install --force
npm run test:unit
deploy-gh-pages:
needs: run-unit-tests
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Apply local settings
uses: finnp/create-file-action@master
env:
FILE_NAME: ".env.local"
FILE_DATA: 'URL_PREFIX = "/crow/"'
- name: Setup Node 🔧
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install and build 🔧
run: |
npm install --force
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: gh-pages
folder: docs