🤖 Debug and fix cmux.io deployment #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Docs | |
| on: | |
| push: | |
| branches: ["main"] | |
| 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 | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin | |
| key: ${{ runner.os }}-cargo-bins-mdbook-mermaid-0.16.0-linkcheck-0.7.7 | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-bins- | |
| - name: Setup mdBook | |
| uses: peaceiris/actions-mdbook@v2 | |
| with: | |
| mdbook-version: "0.4.52" | |
| - name: Install mdbook-mermaid | |
| run: | | |
| if ! command -v mdbook-mermaid &> /dev/null; then | |
| cargo install mdbook-mermaid --version 0.16.0 | |
| fi | |
| mdbook-mermaid install docs | |
| - name: Install mdbook-linkcheck | |
| run: | | |
| if ! command -v mdbook-linkcheck &> /dev/null; then | |
| cargo install mdbook-linkcheck --version 0.7.7 | |
| fi | |
| - name: Build docs | |
| run: cd docs && mdbook build | |
| - name: Copy CNAME to build output | |
| 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 | |
| with: | |
| path: ./docs/book | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |