File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Docs site to Pages
2+
3+ on :
4+ # Runs on pushes targeting the `main` branch. Change this to `master` if you're using master.
5+ push :
6+ branches : [main]
7+ paths :
8+ - ' docs/**'
9+ - ' .github/workflows/deploy-docs.yml'
10+ - ' package.json'
11+ - ' package-lock.json'
12+
13+ # Allows you to run this workflow manually from the Actions tab
14+ workflow_dispatch :
15+
16+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+ permissions :
18+ contents : read
19+ pages : write
20+ id-token : write
21+
22+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
23+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
24+ concurrency :
25+ group : pages
26+ cancel-in-progress : false
27+
28+ jobs :
29+ # Build job
30+ build :
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Checkout
34+ uses : actions/checkout@v4
35+ with :
36+ fetch-depth : 0 # Not needed if lastUpdated is not enabled
37+
38+ - name : Setup Node
39+ uses : actions/setup-node@v4
40+ with :
41+ node-version : 20
42+ cache : npm
43+
44+ - name : Setup Pages
45+ uses : actions/configure-pages@v4
46+
47+ - name : Install dependencies
48+ run : npm ci
49+
50+ - name : Build with VitePress
51+ run : npm run docs:build
52+
53+ - name : Upload artifact
54+ uses : actions/upload-pages-artifact@v3
55+ with :
56+ path : docs/.vitepress/dist
57+
58+ # Deployment job
59+ deploy :
60+ environment :
61+ name : github-pages
62+ url : ${{ steps.deployment.outputs.page_url }}
63+ needs : build
64+ runs-on : ubuntu-latest
65+ name : Deploy
66+ steps :
67+ - name : Deploy to GitHub Pages
68+ id : deployment
69+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments