添加文档部署工作流,移除旧的分支和PR管道配置
Some checks failed
deploying-doc / build-and-deploy (pull_request) Failing after 14s

This commit is contained in:
2025-04-26 18:55:05 +08:00
parent be8ceb950f
commit 5d775aff92
4 changed files with 47 additions and 136 deletions

View File

@@ -0,0 +1,47 @@
name: deploying-doc
run-name: Deploying doc — ${{ gitea.run_id }}
on:
workflow_dispatch:
schedule:
- cron: 45 00 * * 1
pull_request:
types: [closed]
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: 🔧Install pnpm
with:
version: 10
run_install: false
- name: 🔧Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: 🔧Install dependencies
run: pnpm install
- name: 🔴Build doc
run: pnpm run docs:build
- name: 🚀 Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./src/.vuepress/dist --project-name=jingji-spbook-vue --branch=main