From a082a6ff32d56896d1bb9de6ed98f437c1feac61 Mon Sep 17 00:00:00 2001 From: SMGoro <72185434+SMGoro@users.noreply.github.com> Date: Tue, 21 Oct 2025 09:32:09 +0800 Subject: [PATCH] Refactor GitHub Actions workflow for deployment --- .github/workflows/deploy-pages.yml | 33 +++++++++++++++++------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index e9f80337..5f78d432 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -13,36 +13,41 @@ permissions: jobs: build: runs-on: ubuntu-latest - outputs: - build-path: dist + steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v4 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 8 - - name: Set up Node - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: 'pnpm' - - name: Install dependencies run: pnpm install - - name: Build + - name: Build project run: pnpm run build-nocdn - - name: Upload artifact + - name: Upload GitHub Pages artifact uses: actions/upload-pages-artifact@v3 with: - # Upload dist repository - path: './dist' - name: gh-pages + path: ./dist + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4