Skip to content

Commit

Permalink
Add Rust docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
natke committed Feb 16, 2023
1 parent 6f99fb9 commit 3d7625d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-rust-apidocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update Rust API Docs
on:
push:
branches:
- main
paths:
- rust
workflow_dispatch:


jobs:
publish:
name: Generate Rust docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install rustc
- name: Run rust docs generation
run: |
cd rust
cargo doc --no-deps
- name: Set commit ID
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: actions/checkout@v2
with:
ref: gh-pages
clean: false
- name: Move API docs into target area
run: |
rm -rf docs/api/rust
mv rust/target/doc docs/api/rust
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: gh-pages-rustdocs-pr
base: gh-pages
title: '[Automated]: Update Rust API docs'
commit-message: 'Update Rust API docs to commit ${{ steps.vars.outputs.sha_short }}'
add-paths: docs/api/rust

0 comments on commit 3d7625d

Please sign in to comment.