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 : Build and deploy
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+
16+ - name : Setup Node.js
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 22
20+ cache : npm
21+
22+ - name : Install dependencies
23+ run : npm ci
24+
25+ - name : Build with VitePress
26+ run : npm run docs:build
27+
28+ - name : Generate CNAME
29+ run : echo "book.doocs.org" > docs/.vitepress/dist/CNAME
30+
31+ - name : Upload artifact
32+ uses : actions/upload-pages-artifact@v3
33+ with :
34+ path : docs/.vitepress/dist
35+
36+ deploy :
37+ needs : build
38+ runs-on : ubuntu-latest
39+ permissions :
40+ pages : write
41+ id-token : write
42+ environment :
43+ name : github_pages
44+ url : ${{ steps.deployment.outputs.page_url }}
45+ steps :
46+ - name : Deploy to GitHub Pages
47+ id : deployment
48+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments