合并两个job中的任务 #2

Merged
szhhwh merged 1 commits from gitea-workflow into main 2025-04-26 12:46:18 +08:00
Showing only changes of commit 5395cffd2a - Show all commits

View File

@ -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