π€ Add pluggable runtime abstraction layer #540
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: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Required for git describe to find tags | |
- 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/html/CNAME | |
echo "β CNAME file copied to docs/book/html/" | |
cat docs/book/html/CNAME | |
echo "" | |
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/html/index.html | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs/book/html | |
deploy: | |
if: github.event_name != 'pull_request' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }} | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |