docs: include a few links #40
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: Docs | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: Swatinem/rust-cache@v2 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v4 | |
- uses: actions/checkout@v4 | |
- name: Build docs | |
run: cargo doc --no-deps --workspace | |
- run: echo "<meta http-equiv=\"refresh\" content=\"0; url=aoc2023\">" > target/doc/index.html | |
- name: Remove file with bad permissions | |
run: rm target/doc/.lock | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./target/doc | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v3 |