diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 8a81a7a..7ddf155 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -43,4 +43,4 @@ jobs: with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy ./src/.vuepress/dist --project-name=jingji-spbook-vue --branch=main \ No newline at end of file + command: pages deploy ./src/.vuepress/dist --project-name=jingji-spbook --branch=main \ No newline at end of file diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml new file mode 100644 index 0000000..514a2ca --- /dev/null +++ b/.gitea/workflows/dev.yaml @@ -0,0 +1,43 @@ +name: test-doc +run-name: Testing doc — ${{ gitea.run_id }} +on: + workflow_dispatch: + pull_request: + types: [opened] + push: + +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 diff --git a/src/.vuepress/config.ts b/src/.vuepress/config.ts index d60711b..2bdbbe7 100644 --- a/src/.vuepress/config.ts +++ b/src/.vuepress/config.ts @@ -3,11 +3,11 @@ import { defineUserConfig } from "vuepress" import theme from "./theme.js" export default defineUserConfig({ + base: "/", bundler: viteBundler({ viteOptions: {}, vuePluginOptions: {}, }), - base: "/jingji/sp/", lang: "zh-CN", title: "荆棘鸟文学社",