Skip to content

Commit

Permalink
add doc gen ci (#4)
Browse files Browse the repository at this point in the history
* add doc gen ci

* use stable
  • Loading branch information
funnyboy-roks authored Feb 3, 2025
1 parent 24ec679 commit 66c8d2a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: docs

permissions:
contents: write

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo r -- doc-gen
- run: npx @redocly/cli build-docs openapi.yaml -o doc/index.html
- name: Deploy to GitHub Pages
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
publish_dir: doc
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/target
redoc-static.html
doc/

0 comments on commit 66c8d2a

Please sign in to comment.