File tree Expand file tree Collapse file tree 5 files changed +974
-3
lines changed Expand file tree Collapse file tree 5 files changed +974
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Cloudflare Workers
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ deployments : write
14+ steps :
15+ - uses : actions/checkout@v5
16+
17+ - name : Setup pnpm
18+ uses : pnpm/action-setup@v4
19+ with :
20+ version : 10
21+
22+ - name : Setup Node.js
23+ uses : actions/setup-node@v6
24+ with :
25+ node-version : 22
26+ cache : pnpm
27+
28+ - name : Install dependencies
29+ run : pnpm install --frozen-lockfile
30+
31+ - name : Build VitePress site
32+ run : pnpm run docs:build
33+
34+ - name : Deploy to Cloudflare Workers
35+ uses : cloudflare/wrangler-action@v3
36+ with :
37+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
38+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
39+ command : deploy
Original file line number Diff line number Diff line change 1818 },
1919 "homepage" : " https://jvm.doocs.org" ,
2020 "devDependencies" : {
21- "vitepress" : " ^2.0.0-alpha.12"
21+ "vitepress" : " ^2.0.0-alpha.12" ,
22+ "wrangler" : " ^4.44.0"
2223 },
2324 "scripts" : {
2425 "docs:dev" : " vitepress dev docs" ,
2526 "docs:build" : " vitepress build docs" ,
26- "docs:preview" : " vitepress preview docs"
27- }
27+ "docs:preview" : " vitepress preview docs" ,
28+ "deploy:cf" : " pnpm run docs:build && wrangler deploy"
29+ },
30+ "packageManager" :
" [email protected] " 2831}
You can’t perform that action at this time.
0 commit comments