Skip to content

Implemented documentation using cargo doc hosted on GitHub pages #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/host-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Host Documentation
on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
name: Build documentation
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Build Documentation
run: cargo doc -p root --no-deps

- name: Add index.html redirect
run: echo '<meta http-equiv="refresh" content="0; url=root/index.html">' > target/doc/index.html

- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: target/doc

deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
Loading