Skip to content
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

chore(ci): Publish documentation on GitHub pages #180

Merged
merged 1 commit into from
Nov 11, 2024
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy Rust Documentation to GitHub Pages

on:
push:
branches:
- main

permissions:
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out the code
uses: actions/checkout@v4

- name: Install Rust with dtolnay's toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Build Documentation
run: |
cargo doc --workspace --no-deps --document-private-items

- name: Prepare Documentation for GitHub Pages
run: |
mkdir -p gh-pages/unstable
cp -r target/doc/* gh-pages/unstable
echo '<meta http-equiv="refresh" content="0; url=unstable/overview/index.html">' > gh-pages/index.html

- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: gh-pages

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write

steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

Loading