Skip to content

Docs: fix build #2058

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

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Docs: fix build #2058

merged 1 commit into from
Dec 19, 2024

Conversation

drwpow
Copy link
Contributor

@drwpow drwpow commented Dec 19, 2024

Changes

Adds a pnpm run -w build to build all packages for docs.

How to Review

  • CI should pass

Checklist

N/A

@drwpow drwpow requested a review from a team as a code owner December 19, 2024 16:20
@drwpow drwpow requested a review from htunnicliff December 19, 2024 16:20
Copy link

changeset-bot bot commented Dec 19, 2024

⚠️ No Changeset found

Latest commit: f2dfe09

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

@drwpow drwpow requested a review from kerwanp December 19, 2024 16:20
Copy link

cloudflare-workers-and-pages bot commented Dec 19, 2024

Deploying openapi-ts with  Cloudflare Pages  Cloudflare Pages

Latest commit: f2dfe09
Status: ✅  Deploy successful!
Preview URL: https://336c99ea.openapi-ts.pages.dev
Branch Preview URL: https://fix-docs.openapi-ts.pages.dev

View logs

Copy link
Contributor

github-actions bot commented Dec 19, 2024

size-limit report 📦

Path Size
packages/openapi-fetch/dist/index.min.js 6.42 KB (0%)

@@ -4,13 +4,14 @@
"private": true,
"type": "module",
"scripts": {
"build-docs": "pnpm run update-contributors && vitepress build && cp _redirects .vitepress/dist",
"build-docs": "pnpm run update-contributors && pnpm run -w build && vitepress build && cp _redirects .vitepress/dist",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kerwanp Probably worth explaining this weird little quirk of docs:

  • Turborepo will just run the build script in every package. We recommend contributors do this when setting up the project locally
  • However, because we have our contributors list pulling from GitHub, we need an API token to pull this data
    • To fix this, either we require everyone to have a GitHub API token (annoying), or we just make the docs build a different command (less annoying)
  • Because the docs command is intentionally different, this means it runs at different times than the build
  • The docs before didn’t need a build of all packages, so we just skipped it. But since that’s now a requirement, we’ll just build as part of the docs.

This may add a tiny bit of delay to the docs, but the monorepo builds really quickly, so it’s better to just build everything than try and surgically determine the minimal build. It’s always a balance of “what’s efficient compute-wise” and “what’s easiest to work with people-wise” and it’s always good to try and satisfy both reasonably.

@drwpow drwpow force-pushed the fix-docs branch 2 times, most recently from d6411b1 to a9f6594 Compare December 19, 2024 16:33

export default defineConfig({
plugins: [react()],
plugins: [react() as unknown as Plugin],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh this weird type issue is back :/ I feel like this comes and goes a lot

@drwpow
Copy link
Contributor Author

drwpow commented Dec 19, 2024

If it’s alright, I’m just going to force this through without approval because it doesn’t change anything; just unblocks the docs deploy

@drwpow drwpow merged commit 5dc47e0 into main Dec 19, 2024
10 checks passed
@drwpow drwpow deleted the fix-docs branch December 19, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant