feat: add documentation page for picoforge source code

This commit is contained in:
Suyog Tandel
2026-06-23 23:45:11 +05:30
parent 7503ee52d2
commit 720adb6a17
3 changed files with 49 additions and 2 deletions
+47
View File
@@ -0,0 +1,47 @@
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: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rust-docs
- name: Generate Documentation
run: cargo doc --no-deps --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