@@ -15,11 +15,13 @@ permissions:
1515 contents : read
1616
1717jobs :
18- deploy :
18+ build :
1919 if : " !startsWith(github.head_ref, 'release-please')"
2020 runs-on : ubuntu-22.04
2121 concurrency :
2222 group : ${{ github.workflow }}-${{ github.ref }}
23+ outputs :
24+ app_token : ${{ steps.app_token.outputs.token }}
2325 steps :
2426 - name : 检出仓库
2527 uses : actions/checkout@v4
3032 uses : actions/create-github-app-token@v2
3133 id : app-token
3234 with :
35+ skip-token-revoke : true
3336 app-id : ${{ secrets.APP_ID }}
3437 private-key : ${{ secrets.APP_PRIVATE_KEY }}
3538
@@ -50,16 +53,47 @@ jobs:
5053 run : |
5154 pnpm build:docs
5255
56+ - name : 上传构建产物
57+ uses : actions/upload-artifact@v4
58+ with :
59+ name : gi-neko-kit
60+ path : docs/.vuepress/dist
61+
62+ deploy-to-cloudflare-pages :
63+ runs-on : ubuntu-22.04
64+ needs : [build]
65+ steps :
66+ - name : 导入构建产物
67+ uses : actions/download-artifact@v4
68+ with :
69+ name : git-neko-kit
70+ path : ./
71+
5372 - name : 部署到 Cloudflare Pages
5473 id : deploy-cloudflare-pages
5574 uses : AdrianGonz97/refined-cf-pages-action@v1
5675 with :
5776 apiToken : ${{ secrets.CF_TOKEN }}
5877 accountId : ${{ secrets.CF_ID }}
59- githubToken : ${{ steps.app-token .outputs.token }}
78+ githubToken : ${{ needs.build .outputs.app_token }}
6079 projectName : ' git-neko-kit'
61- directory : ' docs/.vuepress/dist '
80+ directory : ' . '
6281 deploymentName : cloudflare-pages
6382 wranglerVersion : ' 3.114.9'
64-
6583
84+ deploy-to-deno-pages :
85+ runs-on : ubuntu-22.04
86+ needs : [build]
87+ steps :
88+ - name : 导入构建产物
89+ uses : actions/download-artifact@v4
90+ with :
91+ name : git-neko-kit
92+ path : ./
93+
94+ - name : 设置Deno环境
95+ uses : denoland/deployctl@v1
96+ with :
97+ project : gie-neko-kit
98+ entrypoint : jsr:@std/http/file-server
99+
0 commit comments