优化CI流程:在合并前提供预览链接 #10
@ -42,6 +42,7 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
deployments: write
|
deployments: write
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: 🚚 Checkout
|
- name: 🚚 Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -67,8 +68,26 @@ jobs:
|
|||||||
run: pnpm run docs:build
|
run: pnpm run docs:build
|
||||||
|
|
||||||
- name: 🚀 Deploy to Cloudflare Pages
|
- name: 🚀 Deploy to Cloudflare Pages
|
||||||
|
id: deploy
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: pages deploy ./src/.vuepress/dist --project-name=jingji-reference
|
command: pages deploy ./src/.vuepress/dist --project-name=jingji-reference
|
||||||
|
|
||||||
|
- name: 💬 Comment on PR
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const deployUrl = process.env.DEPLOY_URL;
|
||||||
|
const commentBody = `🚀 Documentation preview deployed to: [${deployUrl}](${deployUrl})`;
|
||||||
|
|
||||||
|
github.rest.issues.createComment({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
issue_number: context.issue.number,
|
||||||
|
body: commentBody
|
||||||
|
});
|
||||||
|
env:
|
||||||
|
DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }}
|
12
package.json
12
package.json
@ -11,17 +11,17 @@
|
|||||||
"docs:update-package": "pnpm dlx vp-update"
|
"docs:update-package": "pnpm dlx vp-update"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vuepress/bundler-vite": "2.0.0-rc.19",
|
"@vuepress/bundler-vite": "2.0.0-rc.21",
|
||||||
"sass-embedded": "^1.83.4",
|
"sass-embedded": "^1.87.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vuepress": "2.0.0-rc.19",
|
"vuepress": "2.0.0-rc.21",
|
||||||
"vuepress-theme-hope": "2.0.0-rc.68"
|
"vuepress-theme-hope": "2.0.0-rc.82"
|
||||||
},
|
},
|
||||||
"volta": {
|
"volta": {
|
||||||
"node": "22.11.0"
|
"node": "22.11.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/plugin-slimsearch": "2.0.0-rc.61",
|
"@vuepress/plugin-slimsearch": "2.0.0-rc.94",
|
||||||
"katex": "^0.16.20"
|
"katex": "^0.16.22"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2439
pnpm-lock.yaml
generated
2439
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -7,13 +7,13 @@ export default hopeTheme({
|
|||||||
|
|
||||||
author: {
|
author: {
|
||||||
name: "荆棘鸟文学社",
|
name: "荆棘鸟文学社",
|
||||||
url: "https://github.com/szhhwh/",
|
url: "https://gitea.lionhao.top/jjnwxs/",
|
||||||
},
|
},
|
||||||
|
|
||||||
logo: "/logo.png",
|
logo: "/logo.png",
|
||||||
logoDark: '/logo-dark.png',
|
logoDark: '/logo-dark.png',
|
||||||
|
|
||||||
repo: "szhhwh/jingji_TSreference_vue",
|
repo: "https://gitea.lionhao.top/jjnwxs/jingji_reference/",
|
||||||
|
|
||||||
docsDir: "src",
|
docsDir: "src",
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user