2023-10-21 03:13:17 +02:00
|
|
|
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:
|
2023-10-21 03:13:17 +02:00
|
|
|
|
|
|
|
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
|
2023-10-21 03:13:17 +02:00
|
|
|
- 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
|
2023-10-21 03:13:17 +02:00
|
|
|
- name: Create index.html
|
2024-02-18 06:57:02 +01:00
|
|
|
run: echo "<meta http-equiv=\"refresh\" content=\"0; url=pinnacle_api\">" > ./target/doc/index.html
|
2023-10-21 03:13:17 +02:00
|
|
|
- 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
|
2024-02-18 06:57:02 +01:00
|
|
|
publish_dir: ./target/doc
|
2024-02-20 02:07:01 +01:00
|
|
|
force_orphan: true
|