From 586a2f341ff058d414c0755e0423ed7aa551919a Mon Sep 17 00:00:00 2001 From: asepharyana Date: Fri, 21 Aug 2026 12:24:18 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20=E2=80=94=20include-hidden-files:tr?= =?UTF-8?q?ue=20for=20.next=20upload=20(hidden=20dir=20bug)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ROOT CAUSE: 'apps/web/.next/' starts with a dot — it's a HIDDEN directory. actions/upload-artifact@v4 excludes hidden files by default (include-hidden-files: false). This is why the artifact was always empty, causing 'Artifact not found' in the deploy job. Fix: set include-hidden-files: true and use path without glob. Also fix deploy job download path to apps/web and SCP source to match. --- .github/workflows/ci.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5206208..ff55942 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: pull_request: branches: [main] -# Cancel in-progress runs for the same ref so a fresh push supersedes them. concurrency: group: ci-${{ github.ref }} cancel-in-progress: true @@ -34,21 +33,14 @@ jobs: working-directory: apps/web run: bun run build - - name: Verify .next exists - working-directory: apps/web - run: | - echo "=== .next contents ===" - find .next -maxdepth 1 -ls - echo "=== file count ===" - find .next -type f | wc -l - - # Upload the built .next directory as a deploy artifact. + # Upload the built .next directory (hidden dir, so include-hidden-files). # The deploy job downloads this and copies to the VPS — no build on VPS. - name: Upload web build artifact uses: actions/upload-artifact@v4 with: name: mcpedia-web-build - path: apps/web/.next/** + path: apps/web/.next + include-hidden-files: true if-no-files-found: error # Smoke: verify the MCP server + resources load and the indexer/module @@ -80,7 +72,7 @@ jobs: uses: actions/download-artifact@v4 with: name: mcpedia-web-build - path: .next + path: apps/web - name: Copy pre-built .next to VPS uses: appleboy/scp-action@v1 @@ -89,7 +81,7 @@ jobs: port: ${{ secrets.SSH_DEPLOY_PORT }} username: ${{ secrets.SSH_DEPLOY_USER }} key: ${{ secrets.SSH_DEPLOY_KEY }} - source: ".next/*" + source: "apps/web/.next/*" target: "/home/code/mcpedia/apps/web/.next" - name: Deploy to VPS over SSH @@ -104,13 +96,12 @@ jobs: set -e cd /home/code/mcpedia - # Pull latest code (for content, .env, and non-web changes) + # Pull latest code (content, .env, non-web changes) git pull origin main /home/code/.bun/bin/bun install --frozen-lockfile /home/code/.bun/bin/bun run scripts/indexer.ts - # The .next/ was just copied from CI (pre-built, no build on VPS) - # Restart services to pick up the new build + # .next/ was just copied from CI (pre-built, no build on VPS) sudo systemctl restart mcpedia-web mcpedia-api mcpedia-mcp mcpedia-worker sleep 3 systemctl --no-pager status mcpedia-web mcpedia-api mcpedia-mcp mcpedia-worker --no-legend