From 7c2e9bf671debcdb1ed62cb989bddf728f362eef Mon Sep 17 00:00:00 2001 From: jingjidove Date: Sat, 26 Apr 2025 19:25:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=90=88=E5=B9=B6=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=B5=8B=E8=AF=95Action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitea/workflows/dev.yaml diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml new file mode 100644 index 0000000..37bc8ef --- /dev/null +++ b/.gitea/workflows/dev.yaml @@ -0,0 +1,42 @@ +name: test-doc +run-name: Testing doc — ${{ gitea.run_id }} +on: + workflow_dispatch: + pull_request: + types: [opened] + +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: + 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 \ No newline at end of file