合并两个job中的任务
This commit is contained in:
parent
fbfafc914c
commit
880574ba4b
@ -6,8 +6,11 @@ on:
|
||||
- cron: 30 04 * * 1,4
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
steps:
|
||||
- name: 🚚 Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -32,29 +35,9 @@ jobs:
|
||||
- name: 🔴Build doc
|
||||
run: pnpm run docs:build
|
||||
|
||||
- name: 📦 Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: doc-files
|
||||
path: ./src/.vuepress/dist/
|
||||
retention-days: 1
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
steps:
|
||||
- name: ⬇️ Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: doc-files
|
||||
path: ./dist
|
||||
|
||||
- name: 🚀 Deploy to Cloudflare Pages
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy ./dist --project-name=jingji-spbook-vue
|
||||
command: pages deploy ./src/.vuepress/dist --project-name=jingji-spbook-vue
|
||||
|
Loading…
x
Reference in New Issue
Block a user