From 0997b59a82a7de91e0d36577d8785a2c420b7356 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Mon, 6 Oct 2025 12:47:34 -0500 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20Debug=20and=20fix=20cmux.io?= =?UTF-8?q?=20deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add verification logging for CNAME file copy - Update wait_pr_checks.sh to handle merged PRs - Helps diagnose why cmux.io isn't resolving _Generated with `cmux`_ --- .github/workflows/docs.yml | 15 ++++++++++++++- scripts/wait_pr_checks.sh | 10 +++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1f580f164a..88861d5d1e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,6 +6,10 @@ on: paths: - "docs/**" - ".github/workflows/docs.yml" + pull_request: + paths: + - "docs/**" + - ".github/workflows/docs.yml" workflow_dispatch: # Allow manual triggering # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages @@ -59,7 +63,16 @@ jobs: run: cd docs && mdbook build - name: Copy CNAME to build output - run: cp docs/CNAME docs/book/CNAME + run: | + cp docs/CNAME docs/book/CNAME + echo "✅ CNAME file copied to build output:" + cat docs/book/CNAME + echo "" + echo "📦 Files in build output:" + ls -la docs/book/ | head -20 + echo "" + echo "🔍 Checking for index.html:" + ls -lh docs/book/index.html || echo "❌ index.html not found!" - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/scripts/wait_pr_checks.sh b/scripts/wait_pr_checks.sh index f8ae2e7b5f..4db3f6ca10 100755 --- a/scripts/wait_pr_checks.sh +++ b/scripts/wait_pr_checks.sh @@ -15,13 +15,21 @@ echo "" while true; do # Get PR status - STATUS=$(gh pr view "$PR_NUMBER" --json mergeable,mergeStateStatus 2>/dev/null || echo "error") + STATUS=$(gh pr view "$PR_NUMBER" --json mergeable,mergeStateStatus,state 2>/dev/null || echo "error") if [ "$STATUS" = "error" ]; then echo "❌ Failed to get PR status. Does PR #$PR_NUMBER exist?" exit 1 fi + PR_STATE=$(echo "$STATUS" | jq -r '.state') + + # Check if PR is already merged + if [ "$PR_STATE" = "MERGED" ]; then + echo "✅ PR #$PR_NUMBER has been merged!" + exit 0 + fi + MERGEABLE=$(echo "$STATUS" | jq -r '.mergeable') MERGE_STATE=$(echo "$STATUS" | jq -r '.mergeStateStatus') From 8d5bc01053a5f15496e57b9d5b3737498de31895 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Mon, 6 Oct 2025 12:52:16 -0500 Subject: [PATCH 2/3] Skip deploy step on PRs --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 88861d5d1e..82f7e929b7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -80,6 +80,7 @@ jobs: path: ./docs/book deploy: + if: github.event_name != 'pull_request' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} From 28d1e5339552239ee50f0fe2306f10321217ac30 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Mon, 6 Oct 2025 12:53:09 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20Upload=20docs/book/ht?= =?UTF-8?q?ml=20not=20docs/book?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FOUND THE BUG! mdbook outputs to docs/book/html/ but we were uploading docs/book/. This is why cmux.io returns 404 - no index.html in the artifact root! --- .github/workflows/docs.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 82f7e929b7..da8f80300d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -64,20 +64,20 @@ jobs: - name: Copy CNAME to build output run: | - cp docs/CNAME docs/book/CNAME - echo "✅ CNAME file copied to build output:" - cat docs/book/CNAME + cp docs/CNAME docs/book/html/CNAME + echo "✅ CNAME file copied to docs/book/html/" + cat docs/book/html/CNAME echo "" - echo "📦 Files in build output:" - ls -la docs/book/ | head -20 + echo "📦 Files in build output (docs/book/html/):" + ls -la docs/book/html/ | head -20 echo "" echo "🔍 Checking for index.html:" - ls -lh docs/book/index.html || echo "❌ index.html not found!" + ls -lh docs/book/html/index.html - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: ./docs/book + path: ./docs/book/html deploy: if: github.event_name != 'pull_request'