Skip to content

Commit

Permalink
[CI] Feature: Deploy typedoc to permalink (#5740)
Browse files Browse the repository at this point in the history
<!-- 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 -->
  • Loading branch information
gregfromstl committed Dec 14, 2024
1 parent dc1e07b commit f91f631
Show file tree
Hide file tree
Showing 4 changed files with 551 additions and 480 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: TypeDoc

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
concurrency:
group: "typedoc"
cancel-in-progress: true

jobs:
build:
name: "Generate TypeDoc"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install
uses: ./.github/composite-actions/install

- name: Run TypeDoc
run: pnpm typedoc

- name: Update Gist
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GIST_TOKEN }}
script: |
const fs = require('fs');
const content = fs.readFileSync('./packages/thirdweb/typedoc/parsed.json', 'utf8');
const gistId = '678fe1f331a01270bb002fee660f285d';
await github.rest.gists.update({
gist_id: gistId,
files: {
'data.json': {
content: content
}
}
});
console.log(`Permalink: https://gist.githubusercontent.com/raw/${gistId}/data.json`);
Loading

0 comments on commit f91f631

Please sign in to comment.