File tree Expand file tree Collapse file tree 3 files changed +79
-3
lines changed
Expand file tree Collapse file tree 3 files changed +79
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy to Cloudflare
2+ on :
3+ push :
4+ branches : [ 3.x ]
5+
6+ jobs :
7+ build :
8+ runs-on : ubuntu-latest
9+ name : Build Application
10+ permissions :
11+ contents : read
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v5
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Setup Node
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : 20
22+
23+ - name : Install dependencies
24+ run : npm install --force
25+
26+ - name : Build application
27+ run : npm run build
28+
29+ - name : Upload build artifacts
30+ uses : actions/upload-artifact@v4
31+ with :
32+ name : build-files
33+ path : site/dist/
34+ retention-days : 1
35+
36+ deploy :
37+ runs-on : ubuntu-latest
38+ name : Deploy to Cloudflare
39+ needs : build
40+ permissions :
41+ contents : read
42+ deployments : write
43+ steps :
44+ - name : Checkout (for config files)
45+ uses : actions/checkout@v5
46+ with :
47+ sparse-checkout : |
48+ wrangler.jsonc
49+ sparse-checkout-cone-mode : false
50+
51+ - name : Download build artifacts
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : build-files
55+ path : site/dist/
56+
57+ - name : Deploy (Workers + Static Assets)
58+ uses : cloudflare/wrangler-action@v3.14.1
59+ with :
60+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
61+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
62+ command : deploy --config wrangler.jsonc
63+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 3333 "precompile" : " npm run version" ,
3434 "pretest" : " npm run version" ,
3535 "predist" : " npm run version" ,
36- "presite " : " npm run version" ,
36+ "prebuild " : " npm run version" ,
3737 "dev" : " npm run predev && npm run routes && vite serve site" ,
3838 "test" : " cross-env NODE_ENV=test jest --config .jest.js" ,
3939 "compile" : " node antd-tools/cli/run.js compile" ,
5656 "routes" : " node site/scripts/genrateRoutes.js" ,
5757 "tsc" : " tsc --noEmit" ,
5858 "vue-tsc" : " vue-tsc --noEmit" ,
59- "site" : " npm run routes && ./node_modules/vite/bin/vite.js build site --base=https://3x.antdv.com/" ,
60- "pub:site" : " npm run site && node site/scripts/pushToOSS.js" ,
59+ "build" : " npm run routes && ./node_modules/vite/bin/vite.js build site --base=/" ,
6160 "prepare" : " husky install" ,
6261 "version" : " node ./scripts/generate-version" ,
6362 "sort-api" : " node antd-tools/cli/run.js sort-api-table"
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " antdv-v3" ,
3+ "compatibility_date" : " 2025-09-19" ,
4+ "assets" : {
5+ "directory" : " ./site/dist" ,
6+ "not_found_handling" : " single-page-application"
7+ },
8+ "routes" : [
9+ {
10+ "pattern" : " 3x.antdv.com/*" ,
11+ "zone_name" : " antdv.com"
12+ }
13+ ]
14+ }
You can’t perform that action at this time.
0 commit comments