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: Static export locale #7409

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

canerakdas
Copy link
Member

Description

With this PR we aim to only export the default language statically instead of statically exporting all pages based on environment variables

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Copy link

vercel bot commented Jan 16, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jan 16, 2025 7:10pm

@canerakdas canerakdas marked this pull request as ready for review January 16, 2025 08:48
@canerakdas canerakdas requested review from a team as code owners January 16, 2025 08:48
@AugustinMauroy
Copy link
Member

I didn't get why we need that ?

@bmuenzenmeyer
Copy link
Collaborator

I didn't get why we need that ?

lazy consensus from a thread at https://openjs-foundation.slack.com/archives/CVAMEJ4UV/p1735409553256659

Copy link
Collaborator

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

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

I just checked, cause I want to make sure the crowdin build preview in vercel triggers off of the PR, not the push.

The logic uses VERCEL_GIT_COMMIT_REF which is the branch name, so we should be good

- name: Build Next.js (Static All Locales)
# We only run full static builds within Pull Requests. This step is also used to export
# static output in all languages, and it only works on `push` events.
if: github.event_name == 'push'
Copy link
Member

Choose a reason for hiding this comment

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

IMO this should only run against main branch I think; Also @bmuenzenmeyer we need to update branch protection rules to allow the PR to be ✅ with only the default locale,

Copy link
Member Author

Choose a reason for hiding this comment

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

IMO this should only run against main branch I think

Does this section not meet this condition? 🤔

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

Can you check any other API routes that also rely on multi-language generation? Like API routes, IDK.

@canerakdas
Copy link
Member Author

Can you check any other API routes that also rely on multi-language generation? Like API routes, IDK.

I checked the pages where generateStaticParams is used, we only export for the default locale on other pages 🚀

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.

4 participants