ci: upload the mdbook-typst-extra-docs binary #10
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just, mdbook | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: typst-extra-docs | |
| - name: Install mdbook-typst-highlight (fork) | |
| run: | | |
| cargo install --git https://github.com/sicikh/mdbook-typst-highlight --branch upgrade-mdbook-0.5.2 | |
| # The following two steps are unnecessary, but help with debugging. | |
| - name: Build the preprocessor | |
| run: | | |
| cargo build --release --manifest-path ./typst-extra-docs/Cargo.toml | |
| ln -s ./typst-extra-docs/target/release/typst-extra-docs ./mdbook-typst-extra-docs | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdbook-typst-extra-docs | |
| path: ./mdbook-typst-extra-docs | |
| - run: just build | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./book | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment |