From aaeab23b78bb36fffd365325bddfe437b6d96376 Mon Sep 17 00:00:00 2001 From: GUAN MING Date: Sun, 30 Mar 2025 02:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20add=20preview=20for=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview-docs.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/preview-docs.yml diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml new file mode 100644 index 00000000..b28e76e0 --- /dev/null +++ b/.github/workflows/preview-docs.yml @@ -0,0 +1,32 @@ +# .github/workflows/preview.yml +name: Deploy PR previews + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - closed + +concurrency: preview-${{ github.ref }} + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + + - name: Install and Build + if: github.event.action != 'closed' + run: uv run --only-group=docs mkdocs build + + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./site/