Skip to content

Commit 0df8ed1

Browse files
authored
🤖 Fix cmux.io custom domain deployment (#49)
Fixes cmux.io 404 error by ensuring CNAME file is included in deployment. ## Problem - cmux.io returns 404 - GitHub Pages custom domain requires a CNAME file in the root of deployed files - mdbook builds to `docs/book/` directory, which becomes the root when deployed - The CNAME file was not being included in the build output ## Why This Fixes It GitHub Pages uses the CNAME file to configure custom domain routing: 1. When GitHub Pages deploys, it looks for a CNAME file in the root of the deployed site 2. If present, it configures the custom domain to serve that content 3. Without it, the custom domain (cmux.io) has no content to serve → 404 Our workflow: - Builds docs with mdbook → outputs to `docs/book/` - Uploads `docs/book/` as artifact → this becomes the root of the deployed site - **Problem**: CNAME file was in `docs/` but not copied to `docs/book/` - **Solution**: Copy CNAME to build output so it's included in deployment ## Changes - Create `docs/CNAME` with 'cmux.io' - Add workflow step: `cp docs/CNAME docs/book/CNAME` after build - Ensures CNAME is in the deployed artifact root ## Testing Once merged and deployed, https://cmux.io should resolve correctly. _Generated with `cmux`_
1 parent ee62b00 commit 0df8ed1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
- name: Build docs
4343
run: cd docs && mdbook build
4444

45+
- name: Copy CNAME to build output
46+
run: cp docs/CNAME docs/book/CNAME
47+
4548
- name: Upload artifact
4649
uses: actions/upload-pages-artifact@v3
4750
with:

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmux.io

0 commit comments

Comments
 (0)