Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Feature: Deploy typedoc to permalink #5740

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Dec 14, 2024

PR-Codex overview

This PR introduces a script to parse TypeDoc output and a GitHub Actions workflow for generating and updating documentation. It also updates the package.json and pnpm-lock.yaml files to include new dependencies and scripts.

Detailed summary

  • Added parse.mjs script to read, transform, and save TypeDoc JSON data.
  • Created .github/workflows/typedoc.yml for automated TypeDoc generation and Gist update.
  • Updated package.json to include typedoc-better-json and new scripts.
  • Modified pnpm-lock.yaml to reflect changes in dependencies.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

linear bot commented Dec 14, 2024

Copy link

changeset-bot bot commented Dec 14, 2024

⚠️ No Changeset found

Latest commit: 01ab0aa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Dec 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:53pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:53pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:53pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2024 5:53pm

Copy link

graphite-app bot commented Dec 14, 2024

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

github-actions bot commented Dec 14, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.94 KB (0%) 899 ms (0%) 2.7 s (+23.99% 🔺) 3.6 s
thirdweb (cjs) 110.78 KB (0%) 2.3 s (0%) 5.7 s (+14.91% 🔺) 7.9 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 799 ms (+181.93% 🔺) 911 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 128 ms (+136.85% 🔺) 138 ms
thirdweb/react (minimal + tree-shaking) 19.03 KB (0%) 381 ms (0%) 658 ms (+31.18% 🔺) 1.1 s

@gregfromstl gregfromstl force-pushed the greg/cnct-2681-automate-the-process-of-pulling-in-ts-documentation branch from da934bf to 2f539dd Compare December 14, 2024 01:34
Copy link
Member

@joaquim-verges joaquim-verges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting! want to see what this looks like

}
});

console.log(`Permalink: https://gist.githubusercontent.com/raw/${gistId}/data.json`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The console.log statement appears to be misaligned and should be moved inside the script block. Currently it's at the root level of the with block, which will cause a syntax error. Moving it inside the script and aligning it with the rest of the code will resolve this issue:

script: |
  const fs = require('fs');
  // ... rest of the code ...
  console.log(`Permalink: https://gist.githubusercontent.com/${gistId}/data.json`);

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Comment on lines 31 to 30
- name: Generate Documentation
run: pnpm typedoc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generated documentation needs to be published to GitHub Pages. Please add two steps after the Generate Documentation step:

  1. Use actions/upload-pages-artifact to upload the TypeDoc output
  2. Use actions/deploy-pages to deploy the artifact

This will ensure the documentation is accessible via GitHub Pages. Here's a reference implementation:

- name: Upload Pages artifact
  uses: actions/upload-pages-artifact@v2
  with:
    path: typedoc/

- name: Deploy to GitHub Pages
  uses: actions/deploy-pages@v3

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

@gregfromstl gregfromstl force-pushed the greg/cnct-2681-automate-the-process-of-pulling-in-ts-documentation branch from 2f539dd to 80b6390 Compare December 14, 2024 01:36
@gregfromstl gregfromstl changed the title [CI] Feature: Deploy typedoc to github pages [CI] Feature: Deploy typedoc to permalink Dec 14, 2024
@gregfromstl gregfromstl force-pushed the greg/cnct-2681-automate-the-process-of-pulling-in-ts-documentation branch from 80b6390 to a63d28e Compare December 14, 2024 01:37
Copy link
Member Author

gregfromstl commented Dec 14, 2024

Merge activity

  • Dec 13, 9:24 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 14, 12:41 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 14, 12:54 PM EST: A user merged this pull request with the Graphite merge queue.

Copy link

codecov bot commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.02%. Comparing base (dc1e07b) to head (f91f631).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5740   +/-   ##
=======================================
  Coverage   53.01%   53.02%           
=======================================
  Files        1101     1101           
  Lines       59079    59079           
  Branches     4809     4810    +1     
=======================================
+ Hits        31322    31327    +5     
+ Misses      27039    27034    -5     
  Partials      718      718           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from dc1e07b
packages 50.16% <ø> (+0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

see 2 files with indirect coverage changes

<!-- 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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants