Adding GitHub Actions for building/testing and deploying cargo docs to GitHub Pages.

This commit is contained in:
fosdick.io
2024-02-06 14:00:04 -07:00
parent 47fafa1a4e
commit 8f1fc2fa65
2 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Generate Documentation
run: cargo doc --no-deps
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc