-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (72 loc) · 1.9 KB
/
deploy.yml
File metadata and controls
74 lines (72 loc) · 1.9 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Deploy
on:
push:
branches:
- dev
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: pnpm/action-setup@v5.0.0
- name: Use Node.js
uses: actions/setup-node@v6
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- run: pnpm i
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
- name: Run E2E tests 🧪
run: pnpm test:e2e
- name: Upload Playwright report
uses: actions/upload-artifact@v7
if: failure()
with:
name: playwright-report
path: playwright-report/
retention-days: 7
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5.0.0
- name: Use Node.js
uses: actions/setup-node@v6
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- run: pnpm i
- run: pnpm lint
build-and-deploy:
needs: [e2e, lint]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
# fetch whole history (needed for article creation time to work correctly)
fetch-depth: 0
- uses: pnpm/action-setup@v5.0.0
- name: Use Node.js
uses: actions/setup-node@v6
with:
cache: 'pnpm'
node-version-file: '.nvmrc'
- run: pnpm i
- name: Build 🔧
env:
PROD: 'true'
VITE_TURNSTILE_SITEKEY: ${{ vars.TURNSTILE_SITEKEY }}
run: pnpm build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: main
FOLDER: dist
- name: on deployment success
if: env.deployment_status == 'success'
run: echo "Deployment success"