Skip to content

Commit f91f631

Browse files
committed
[CI] Feature: Deploy typedoc to permalink (#5740)
<!-- start pr-codex --> ## PR-Codex overview This PR introduces a new `TypeDoc` workflow for generating documentation and updates the `parse.mjs` script to process documentation data. It also modifies the `package.json` to include the `typedoc-better-json` dependency and adjusts the `pnpm-lock.yaml` accordingly. ### Detailed summary - Added `TypeDoc` GitHub Actions workflow in `.github/workflows/typedoc.yml`. - Created a new `parse.mjs` script in `packages/thirdweb/scripts` for transforming documentation data. - Updated `package.json` to include `typedoc-better-json` as a dependency. - Adjusted `pnpm-lock.yaml` to reflect changes in dependencies and versions. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent dc1e07b commit f91f631

File tree

4 files changed

+551
-480
lines changed

4 files changed

+551
-480
lines changed

.github/workflows/typedoc.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: TypeDoc
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Allow only one concurrent deployment
14+
concurrency:
15+
group: "typedoc"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
name: "Generate TypeDoc"
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Install
27+
uses: ./.github/composite-actions/install
28+
29+
- name: Run TypeDoc
30+
run: pnpm typedoc
31+
32+
- name: Update Gist
33+
uses: actions/github-script@v7
34+
with:
35+
github-token: ${{ secrets.GIST_TOKEN }}
36+
script: |
37+
const fs = require('fs');
38+
const content = fs.readFileSync('./packages/thirdweb/typedoc/parsed.json', 'utf8');
39+
const gistId = '678fe1f331a01270bb002fee660f285d';
40+
41+
await github.rest.gists.update({
42+
gist_id: gistId,
43+
files: {
44+
'data.json': {
45+
content: content
46+
}
47+
}
48+
});
49+
50+
console.log(`Permalink: https://gist.githubusercontent.com/raw/${gistId}/data.json`);

0 commit comments

Comments
 (0)