Skip to content

Commit 3806a75

Browse files
committed
deploy-vitepress-pages-workflow
1 parent 4143d8e commit 3806a75

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Build the VitePress site and deploy it to GitHub Pages.
2+
name: Deploy VitePress site to Pages
3+
4+
on:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: 24
31+
cache: npm
32+
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v4
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Build with VitePress
40+
run: npm run docs:build
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs/.vitepress/dist
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
needs: build
52+
runs-on: ubuntu-latest
53+
name: Deploy
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)