-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (42 loc) · 1.11 KB
/
testAndDeploy.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: Test and Deploy
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install 🔧
run: npm install
- name: Lint 🔧
run: npm run lint
- name: Typecheck 🔧
run: npm run typecheck
- name: Test 🔧
run: npm test
- name: Build 🔧
run: npm run build
- name: E2E 🔧
run: |
npx playwright install-deps
npm run test-e2e-ci
- name: Lighthouse 💡
run: npm run test-lighthouse
build-and-deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: test
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install 🔧
run: npm install
- name: Build 🔧
run: |
npm run build
touch out/.nojekyll
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: out # The folder the action should deploy.