pinnacle/.github/workflows/rustdoc.yml

38 lines
974 B
YAML
Raw Normal View History

name: Build Rust Docs
on:
pull_request:
branches:
- main
paths:
- "api/rust/**"
push:
branches:
- main
paths:
- "api/rust/**"
2023-10-21 04:24:00 +02:00
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
2024-01-22 06:47:49 +01:00
- name: Get protoc
run: sudo apt install protobuf-compiler
- name: Build docs
2024-02-20 01:57:41 +01:00
run: cd ./api/rust && cargo doc --no-deps -p pinnacle-api -p tokio -p xkbcommon
- 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:
2024-02-20 01:57:41 +01:00
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY_RUST }}
external_repository: pinnacle-comp/rust-reference
publish_dir: ./target/doc
2024-02-20 02:07:01 +01:00
force_orphan: true