From 9b372a7ba53313a1a6792b21fa12d1e2d1d4eff5 Mon Sep 17 00:00:00 2001 From: guodong Date: Tue, 10 Feb 2026 18:10:19 +0800 Subject: [PATCH] update --- .github/workflows/deploy.yaml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 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 000000000..3549afef8 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,51 @@ +name: Deploy Quartz to GitHub Pages +on: + push: + branches: + - main # 确认你的 quartz 仓库主分支是 main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install Dependencies + run: npm ci + + - name: Build Quartz + run: npx quartz build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: public + + deploy: + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file