From c1a16b8587326ce34340fc07a4b1e1c98a194781 Mon Sep 17 00:00:00 2001 From: szhhwh <3116737282@qq.com> Date: Sat, 26 Apr 2025 08:24:37 +0800 Subject: [PATCH 1/2] Create deplay.yaml --- .gitea/workflows/deploy.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..e69de29 -- 2.34.1 From fd99ceb16b60bb2210e8693894327d99fb255a6e Mon Sep 17 00:00:00 2001 From: szhhwh <3116737282@qq.com> Date: Sat, 26 Apr 2025 08:50:15 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20deploy.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yaml | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index e69de29..7c6f5b8 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,60 @@ +name: deploying-doc +run-name: Deploying doc — ${{ gitea.run_id }} +on: + workflow_dispatch: + schedule: + - cron: 30 04 * * 1,4 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: 🚚 Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: pnpm/action-setup@v4 + name: 🔧Install pnpm + with: + version: 9 + 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: 📦 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 -- 2.34.1