Skip to content

Commit 1c42f5a

Browse files
Add files via upload
1 parent 559d864 commit 1c42f5a

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

deploy.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: 'pages'
17+
cancel-in-progress: false
18+
19+
env:
20+
VITE_BASE: /${{ github.event.repository.name }}
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
cache: npm
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Run tests
39+
run: npm run test -- --run
40+
41+
- name: Build
42+
run: npm run build
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: dist
48+
49+
deploy:
50+
needs: build
51+
runs-on: ubuntu-latest
52+
environment:
53+
name: github-pages
54+
url: ${{ steps.deployment.outputs.page_url }}
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4
59+
name: Deploy to GitHub Pages
60+
61+
on:
62+
push:
63+
branches:
64+
- main
65+
- master
66+
workflow_dispatch:
67+
68+
permissions:
69+
contents: read
70+
pages: write
71+
id-token: write
72+
73+
concurrency:
74+
group: 'pages'
75+
cancel-in-progress: false
76+
77+
env:
78+
VITE_BASE: /${{ github.repo }}
79+
80+
jobs:
81+
build:
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Checkout
85+
uses: actions/checkout@v4
86+
87+
- name: Setup Node
88+
uses: actions/setup-node@v4
89+
with:
90+
node-version: 20
91+
cache: npm
92+
93+
- name: Install dependencies
94+
run: npm ci
95+
96+
- name: Run tests
97+
run: npm run test -- --run
98+
99+
- name: Build
100+
run: npm run build
101+
102+
- name: Upload artifact
103+
uses: actions/upload-pages-artifact@v3
104+
with:
105+
path: dist
106+
107+
deploy:
108+
needs: build
109+
environment:
110+
name: github-pages
111+
url: ${{ steps.deployment.outputs.page_url }}
112+
runs-on: ubuntu-latest
113+
steps:
114+
- name: Deploy
115+
id: deployment
116+
uses: actions/deploy-pages@v4
117+

0 commit comments

Comments
 (0)