-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 1.86 KB
/
Copy pathdeploy.yml
File metadata and controls
84 lines (70 loc) · 1.86 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
75
76
77
78
79
80
81
82
83
84
name: Build and Deploy
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Yarn
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Build
env:
VITE_GITHUB_CLIENT_ID: ${{ vars.VITE_GITHUB_CLIENT_ID }}
VITE_REDIRECT_URI: ${{ vars.VITE_REDIRECT_URI }}
VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }}
VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL }}
run: yarn build && cp ./dist/index.html ./dist/404.html
- name: Lint
continue-on-error: true
run: yarn lint
- name: Test
run: yarn test:ci
- name: Coveralls
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
file: coverage/clover.xml
- name: Store dist files
uses: actions/upload-artifact@v7
with:
name: dist-files
path: ./dist/
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
concurrency:
group: "pages"
cancel-in-progress: true
steps:
- name: Setup Pages
uses: actions/configure-pages@v6
- uses: actions/download-artifact@v8
with:
name: dist-files
path: ./dist/
- name: Upload to Github Pages
uses: actions/upload-pages-artifact@v5
with:
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5