Everywhere: update shadow and thiserror #430
This file contains 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 website to GitHub Pages | |
on: | |
push: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
create-page: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2024-11-20 | |
profile: minimal | |
- name: Install Wasm target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Output Rust version to file | |
run: cargo --version > rust-version | |
- name: Cargo cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('rust-version') }}-nodefault | |
- name: Install trunk | |
uses: extractions/setup-crate@v1 | |
with: | |
owner: thedodd | |
name: trunk | |
# https://github.com/thedodd/trunk/issues/575 | |
version: 0.16.0 | |
- name: Install mdbook | |
uses: extractions/setup-crate@v1 | |
with: | |
owner: rust-lang | |
name: mdBook | |
- name: Install mdbook-linkcheck | |
uses: extractions/setup-crate@v1 | |
with: | |
owner: Michael-F-Bryan | |
name: mdbook-linkcheck | |
- name: Install mdbook-toc | |
uses: extractions/setup-crate@v1 | |
with: | |
owner: badboy | |
name: mdbook-toc | |
- name: Install just | |
uses: extractions/setup-crate@v1 | |
with: | |
owner: casey | |
name: just | |
- name: Build and assemble site | |
run: just website | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "site/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload page artifact | |
uses: actions/upload-pages-artifact@v3.0.1 | |
with: | |
path: site | |
deploy: | |
runs-on: ubuntu-latest | |
needs: create-page | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4.0.5 |