mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-15 15:33:47 +00:00
48 lines
992 B
YAML
48 lines
992 B
YAML
name: Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
pages: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
rustdoc:
|
|
name: Build API docs
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
|
|
- name: Build Documentation
|
|
run: |
|
|
cargo doc --no-deps
|
|
echo '<meta http-equiv="refresh" content="0;url=mrc/index.html">' > target/doc/index.html
|
|
|
|
- name: Deploy Docs
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./target/doc
|
|
publish_branch: gh-pages
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: target/doc
|