From bc2c2fbeace6fa745119f90cabf0ad0100573708 Mon Sep 17 00:00:00 2001 From: popWheat <49830650+j10ccc@users.noreply.github.com> Date: Mon, 17 Jul 2023 20:47:58 +0800 Subject: [PATCH] chore(ci): deploy on GitHub page (#1) --- .github/workflows/deploy.yaml | 46 +++++++++++++++++++++++++++++++++++ docs/.vitepress/config.js | 1 + 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..5b1084f --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,46 @@ +name: Deploy +on: + workflow_dispatch: {} + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 8 + run_install: false + + - run: pnpm i + + - name: Build + run: pnpm docs:build + + - uses: actions/configure-pages@v2 + + - uses: actions/upload-pages-artifact@v1 + with: + path: docs/.vitepress/dist + + - name: Deploy + id: deployment + uses: actions/deploy-pages@v1 diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index bcb5cff..f896218 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -1,6 +1,7 @@ import { defineConfig } from "vitepress"; export default defineConfig({ + base: "/wejh-docs/", title: "微精弘开发文档", description: "docs for wejh weapp development", themeConfig: {