Skip to content

Commit 6bb530c

Browse files
Merge pull request #13 from call-0f-code/new-api-docs-workflow
Add GitHub Actions workflow to generate and publish API documentation
2 parents 72d3408 + 4983c7c commit 6bb530c

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/apidocs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Generate & Publish API Docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/routes/**'
8+
- 'apidoc.json'
9+
10+
jobs:
11+
docs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Install apidoc with Bun
22+
run: bun install --no-save apidoc
23+
24+
- name: Generate docs
25+
run: bunx apidoc -c apidoc.json -o docs/apidoc
26+
27+
- name: Deploy to GitHub Pages
28+
uses: peaceiris/actions-gh-pages@v4
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
publish_dir: ./docs/apidoc

0 commit comments

Comments
 (0)