Skip to content

Commit a9339b8

Browse files
committed
docs: generate reference API site and publish to GitHub Pages on publish
1 parent 0bcee7b commit a9339b8

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
id-token: write # enables OIDC for npmjs.com "Trusted Publisher" and provenance
14-
contents: read
14+
contents: write # push API reference to gh-pages (docs/)
1515
steps:
1616
- uses: actions/checkout@v6
1717
with:
@@ -64,3 +64,15 @@ jobs:
6464
# org admin Github Token required for the changelog/tag commit+push
6565
# to work via an exception to branch protection rules
6666
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
67+
- name: Build API reference (TypeDoc)
68+
run: yarn reference:api:gh-pages
69+
- name: Publish API reference to GitHub Pages
70+
uses: peaceiris/actions-gh-pages@v4
71+
with:
72+
github_token: ${{ secrets.GH_TOKEN }}
73+
publish_branch: gh-pages
74+
publish_dir: ./apidocs-out
75+
destination_dir: docs
76+
user_name: 'Invertase Publisher'
77+
user_email: 'oss@invertase.io'
78+
commit_message: 'docs: update TypeDoc API reference'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ packages/**/version.js
539539
packages/**/version.ts
540540
typedoc.raw.json
541541
reference/
542+
apidocs-out/
542543
tests/ios/Firebase
543544
tests/ios/resetXcode.sh
544545
.tmp

0 commit comments

Comments
 (0)