Skip to content

Commit

Permalink
feat: added workflow to generate backend docs
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Nov 2, 2024
1 parent 4c4e401 commit 6a9a353
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Generate API Documentation

on:
push:
branches:
- main
paths:
- "backend/**"
- ".github/workflows/docs.yaml"

jobs:
gen_docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: docs

- name: Reset Branch
run: |
git fetch origin
git reset --hard 'origin/${{ github.ref_name }}'
- name: Install Rust and Dependencies
run: |
sudo apt install libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
rustup update stable && rustup default stable
- name: Generate Rust Docs
run: |
pushd backend/
cargo doc --no-deps
mv target/doc/ ../docs/
popd
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: 'docs -f'
commit: --signoff
message: 'docs: updated API documentation'
push: origin docs -f

0 comments on commit 6a9a353

Please sign in to comment.