Files
picoforge/.github/workflows/docs.yml
T
Suyog Tandel 8a769bc169 ci: replace Nix with rust-toolchain, add audit-check and CodeQL jobs
- Switch `checks` and docs jobs from Nix to dtolnay/rust-toolchain +
  Swatinem/rust-cache + apt system deps for faster setup
- Add dependency vulnerability scanning via rustsec/audit-check@v2.0.0
- Add CodeQL static analysis via github/codeql-action@v4 (manual build)
2026-07-09 20:22:32 +05:30

49 lines
1.1 KiB
YAML

name: Deploy Documentation
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Generate Documentation
run: cargo doc --document-private-items
- name: Create Redirect Index
run: |
CRATE_NAME=$(sed -n 's/^name = "\(.*\)"/\1/p' Cargo.toml | head -n 1 | tr '-' '_')
echo "<meta http-equiv=\"refresh\" content=\"0; url=${CRATE_NAME}/index.html\">" > target/doc/index.html
- name: Upload Artifact
uses: actions/upload-pages-artifact@v5
with:
path: target/doc
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5