pinnacle/.github/workflows/rustdoc.yml
Ottatop 8776281493
Some checks failed
CI (Pinnacle) / Build (push) Has been cancelled
CI (Pinnacle) / Run tests (push) Has been cancelled
CI (Pinnacle) / Check formatting (push) Has been cancelled
CI (Pinnacle) / Clippy check (push) Has been cancelled
Build and Publish Lua Docs / Build (push) Has been cancelled
Build Rust Docs / Build docs (push) Has been cancelled
CI/doc/rust: Remove xkbcommon
2024-08-07 11:41:29 -05:00

40 lines
1 KiB
YAML

name: Build Rust Docs
on:
pull_request:
branches:
- main
paths:
- "api/rust/**"
push:
branches:
- main
paths:
- "api/rust/**"
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Get protoc
run: sudo apt install protobuf-compiler
- name: Build docs
run: cd ./api/rust && cargo doc --no-deps -p pinnacle-api -p tokio -p snowcap-api
- name: Create index.html
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=pinnacle_api\">" > ./target/doc/index.html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY_RUST }}
external_repository: pinnacle-comp/rust-reference
publish_dir: ./target/doc
destination_dir: ${{ env.BRANCH_NAME }}
# force_orphan: true