Skip to content

Commit a6905d6

Browse files
committed
Configure GitHub Pages deployment with Vite base URL and Actions workflow
1 parent deb29d2 commit a6905d6

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Node
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: Build
39+
run: npm run build
40+
41+
- name: Setup Pages
42+
uses: actions/configure-pages@v4
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: "./dist"
48+
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)