Skip to content

Commit 8222a96

Browse files
committed
fix(docs): workflow to generate+publish API docs, call same on publish
1 parent 78d1c6c commit 8222a96

3 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy API Reference
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
deploy-api-reference:
6+
name: 'Deploy API Reference'
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: lts/*
19+
registry-url: 'https://registry.npmjs.org'
20+
- name: Install latest NPM
21+
run: |
22+
npm --version
23+
npm install -g npm@latest
24+
npm --version
25+
- name: Yarn Install
26+
uses: nick-fields/retry@v3
27+
with:
28+
timeout_minutes: 15
29+
retry_wait_seconds: 60
30+
max_attempts: 3
31+
command: yarn
32+
- name: Build API reference (TypeDoc)
33+
run: yarn reference:api:gh-pages
34+
- name: Upload API reference artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./apidocs-out

.github/workflows/publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,12 @@ 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+
68+
deploy-api-reference:
69+
name: 'Deploy API Reference'
70+
needs: publish_npm
71+
uses: ./.github/workflows/deploy-api-reference.yml
72+
permissions:
73+
contents: read
74+
pages: write
75+
id-token: write

.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)