From a678f6cd2ec413bbd72f55bde4aeb35f473c6d05 Mon Sep 17 00:00:00 2001 From: snomiao Date: Thu, 16 Oct 2025 01:10:44 +0000 Subject: [PATCH] feat: add incremental build caching and branch-specific Vercel deployment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add build artifact caching using branch name as cache key - Cache .pages, storybook-static, and coverage directories - Configure Vercel deployment with branch-specific alias domains - Optimize build performance with cache restore fallbacks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/release-pages.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-pages.yml b/.github/workflows/release-pages.yml index 438095c11..c4b873829 100644 --- a/.github/workflows/release-pages.yml +++ b/.github/workflows/release-pages.yml @@ -36,6 +36,18 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + - name: Cache build artifacts + uses: actions/cache@v4 + with: + path: | + .pages + storybook-static + coverage + key: build-cache-${{ github.ref_name }}-${{ hashFiles('pnpm-lock.yaml', 'package.json') }} + restore-keys: | + build-cache-${{ github.ref_name }}- + build-cache-main- + - name: Download Storybook artifact (source run) id: fetch_storybook_trigger continue-on-error: true @@ -96,7 +108,7 @@ jobs: name: built-pages path: '.pages' - incremental-deploy-github-pages: + deploy-github-pages: permissions: contents: read pages: write @@ -134,9 +146,11 @@ jobs: - name: Deploy to Vercel uses: amondnet/vercel-action@v20 with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required - vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # Required - vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # Required + vercel-token: ${{ secrets.VERCEL_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} working-directory: .pages - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Required for Vercel Action + vercel-args: '--prod' + github-comment: false + alias-domains: | + ${{ github.ref_name }}-comfyui-frontend-docs.vercel.app