fix[macos]: unbreak #1
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: MDBook (dev) | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| jobs: | |
| mdbook: | |
| permissions: | |
| contents: write # To push a branch | |
| id-token: write # To update the deployment status | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install latest mdbook | |
| run: | | |
| tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | |
| url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | |
| mkdir mdbook | |
| curl -sSL $url | tar -xz --directory=./mdbook | |
| echo `pwd`/mdbook >> $GITHUB_PATH | |
| - name: Build Book | |
| run: | | |
| cd book | |
| MDBOOK_html__site_url="/book/" MDBOOK_book__title="Rustcast-cross docs [DEV]" mdbook build --dest-dir ../site/book | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: compiled_mdbook | |
| path: site/book | |
| rustdoc: | |
| permissions: | |
| contents: write # To push a branch | |
| id-token: write # To update the deployment status | |
| runs-on: windows-latest # linux needs system deps which i cba to add a step to add | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Rust (stable) | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Run rustdoc | |
| run: cargo doc --no-deps --target-dir site | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: compiled_rustdoc | |
| path: site/doc | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: [mdbook, rustdoc] | |
| permissions: | |
| contents: write # To push a branch | |
| pages: write # To push to a GitHub Pages site | |
| id-token: write # To update the deployment status | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: compiled_mdbook | |
| path: site/book | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: compiled_rustdoc | |
| path: site/doc | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire repository | |
| path: 'site' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |