Skip to content

Commit 220c44b

Browse files
authored
🤖 Debug and fix cmux.io deployment (#51)
## Problem cmux.io still returns 404 even after PR #49 which added CNAME file. ## Root Cause Investigation Need to verify: - CNAME file is being copied correctly to build output - GitHub Pages is configured to use custom domain - Deployment is actually happening ## Changes 1. **Add verification logging** - Show CNAME file content and verify it exists in build output 2. **Update wait_pr_checks.sh** - Exit successfully when PR is auto-merged (prevents hanging) ## Next Steps Once this PR runs, we can see in the logs whether CNAME is correctly placed in the artifact. If it is, the issue may be: - GitHub Pages custom domain settings need to be configured in repo settings - DNS propagation delay - Need to manually trigger GitHub Pages deployment ## Testing Check the workflow logs after this runs to verify CNAME is in `docs/book/CNAME`. _Generated with `cmux`_
1 parent 37ef566 commit 220c44b

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/docs.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
paths:
77
- "docs/**"
88
- ".github/workflows/docs.yml"
9+
pull_request:
10+
paths:
11+
- "docs/**"
12+
- ".github/workflows/docs.yml"
913
workflow_dispatch: # Allow manual triggering
1014

1115
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -59,14 +63,24 @@ jobs:
5963
run: cd docs && mdbook build
6064

6165
- name: Copy CNAME to build output
62-
run: cp docs/CNAME docs/book/CNAME
66+
run: |
67+
cp docs/CNAME docs/book/html/CNAME
68+
echo "✅ CNAME file copied to docs/book/html/"
69+
cat docs/book/html/CNAME
70+
echo ""
71+
echo "📦 Files in build output (docs/book/html/):"
72+
ls -la docs/book/html/ | head -20
73+
echo ""
74+
echo "🔍 Checking for index.html:"
75+
ls -lh docs/book/html/index.html
6376
6477
- name: Upload artifact
6578
uses: actions/upload-pages-artifact@v3
6679
with:
67-
path: ./docs/book
80+
path: ./docs/book/html
6881

6982
deploy:
83+
if: github.event_name != 'pull_request'
7084
environment:
7185
name: github-pages
7286
url: ${{ steps.deployment.outputs.page_url }}

scripts/wait_pr_checks.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,21 @@ echo ""
1515

1616
while true; do
1717
# Get PR status
18-
STATUS=$(gh pr view "$PR_NUMBER" --json mergeable,mergeStateStatus 2>/dev/null || echo "error")
18+
STATUS=$(gh pr view "$PR_NUMBER" --json mergeable,mergeStateStatus,state 2>/dev/null || echo "error")
1919

2020
if [ "$STATUS" = "error" ]; then
2121
echo "❌ Failed to get PR status. Does PR #$PR_NUMBER exist?"
2222
exit 1
2323
fi
2424

25+
PR_STATE=$(echo "$STATUS" | jq -r '.state')
26+
27+
# Check if PR is already merged
28+
if [ "$PR_STATE" = "MERGED" ]; then
29+
echo "✅ PR #$PR_NUMBER has been merged!"
30+
exit 0
31+
fi
32+
2533
MERGEABLE=$(echo "$STATUS" | jq -r '.mergeable')
2634
MERGE_STATE=$(echo "$STATUS" | jq -r '.mergeStateStatus')
2735

0 commit comments

Comments
 (0)