1
+ name : Deploy VitePress site to Pages
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+
7
+ # Allows you to run this workflow manually from the Actions tab
8
+ workflow_dispatch :
9
+
10
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11
+ permissions :
12
+ contents : read
13
+ pages : write
14
+ id-token : write
15
+
16
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18
+ concurrency :
19
+ group : pages
20
+ cancel-in-progress : false
21
+
22
+ jobs :
23
+ # Build job
24
+ build :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - name : Checkout
28
+ uses : actions/checkout@v4
29
+ with :
30
+ fetch-depth : 0 # Not needed if lastUpdated is not enabled
31
+ # - uses: pnpm/action-setup@v3 # Uncomment this block if you're using pnpm
32
+ # with:
33
+ # version: 9 # Not needed if you've set "packageManager" in package.json
34
+ # - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
35
+ - name : Setup Node
36
+ uses : actions/setup-node@v4
37
+ with :
38
+ node-version : 20
39
+ cache : npm # or pnpm / yarn
40
+ - name : Setup Pages
41
+ uses : actions/configure-pages@v4
42
+ - name : Install dependencies
43
+ run : npm ci # or pnpm install / yarn install / bun install
44
+ - name : Build with VitePress
45
+ run : npm run home:build
46
+ - name : Upload artifact
47
+ uses : actions/upload-pages-artifact@v3
48
+ with :
49
+ path : home/.vitepress/dist
50
+
51
+ # Deployment
52
+ deploy :
53
+ environment :
54
+ name : github-pages
55
+ url : ${{ steps.deployment.outputs.page_url }}
56
+ needs : build
57
+ runs-on : ubuntu-latest
58
+ name : Deploy
59
+ steps :
60
+ - name : Deploy to GitHub Pages
61
+ id : deployment
62
+ uses : actions/deploy-pages@v4
0 commit comments