chore: normalize copier template URL #3
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: "CI" | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: "ci-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
just: | |
name: "Just" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Install the Rust toolchain" | |
uses: "dtolnay/rust-toolchain@stable" | |
with: | |
components: "clippy, rustfmt" | |
- name: "Install sccache" | |
uses: "mozilla-actions/[email protected]" | |
- name: "Set up sccache" | |
run: | | |
echo "RUSTC_WRAPPER=sccache" >> "${GITHUB_ENV}" | |
echo "SCCACHE_GHA_ENABLED=true" >> "${GITHUB_ENV}" | |
- name: "Install development tools" | |
uses: "taiki-e/install-action@v2" | |
with: | |
tool: "just, cargo-audit, typos" | |
- name: "Cache Cargo directories" | |
uses: "actions/cache@v4" | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.cargo/.crates.toml | |
~/.cargo/.crates2.json | |
~/.cargo/advisory-db/ | |
target/ | |
key: "${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml', 'Cargo.lock') }}" | |
restore-keys: "${{ runner.os }}-cargo-" | |
- name: "Run Just" | |
run: "just ci" | |
env: | |
RUSTFLAGS: "-D warnings" | |
RUSTDOCFLAGS: "-D warnings" | |
- name: "Upload docs artifact" | |
uses: "actions/upload-artifact@v4" | |
with: | |
name: "docs" | |
path: "./target/doc" | |
retention-days: 7 | |
pages: | |
name: "Pages" | |
if: "github.ref == format('refs/heads/{0}', github.event.repository.default_branch)" | |
needs: "just" | |
permissions: | |
pages: "write" | |
id-token: "write" | |
environment: | |
name: "github-pages" | |
url: "${{ steps.deployment.outputs.page_url }}" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Download docs artifact" | |
uses: "actions/download-artifact@v4" | |
with: | |
name: "docs" | |
path: "${{ runner.temp }}/pages/docs" | |
- name: "Upload pages artifact" | |
uses: "actions/upload-pages-artifact@v3" | |
with: | |
path: "${{ runner.temp }}/pages" | |
- name: "Deploy pages" | |
id: "deployment" | |
uses: "actions/deploy-pages@v4" |