Skip to content

Prepare site for live deployment#2340

Merged
jcstein merged 3 commits intodocs-glow-upfrom
gb/remove-redirects
Dec 12, 2025
Merged

Prepare site for live deployment#2340
jcstein merged 3 commits intodocs-glow-upfrom
gb/remove-redirects

Conversation

@gbarros
Copy link
Copy Markdown
Contributor

@gbarros gbarros commented Dec 12, 2025

This pull request makes significant changes to the documentation site's build, deployment, and link-checking processes. The main updates include simplifying the static export and deployment configuration, removing custom redirect handling, and updating scripts and dependencies to support these changes.

Build and Deployment Process Improvements:

  • Added a new GitHub Actions workflow (.github/workflows/deploy.yml) to automate deploying the static documentation site to GitHub Pages using Nextra, including steps for building, generating assets, and deploying to a custom domain.
  • Simplified the Next.js configuration in next.config.mjs by always setting output: 'export' and removing conditional/static export logic and custom redirect handling. [1] [2]
  • Updated build and start scripts in package.json to reflect the new static export process and use the serve package for local serving. [1] [2]
  • Adjusted the preview workflow to use the standard yarn build command instead of a custom static build script.

Redirect and Link Checking Changes:

  • Removed the redirects.json file and all related logic for handling custom redirects in both the Next.js config and the scripts/check-links.mjs link checker. The link checker now only validates routes and no longer considers redirects. [1] [2] [3] [4] [5] [6] [7]

Dependency Cleanup:

  • Removed unused imports (fs and path) from next.config.mjs that were previously used for redirect handling.

These changes streamline the deployment workflow, ensure a consistent static export, and remove custom redirect logic in favor of a simpler, more maintainable setup.

- Updated `next.config.mjs` to set a static output mode and removed the conditional output based on environment variables.
- Simplified the build process in the GitHub Actions workflow by changing the build command to `yarn build`.
- Removed the `redirects.json` file and associated logic from the `check-links.mjs` script to streamline route inventory processing.
- Updated `package.json` to reflect changes in build scripts and added necessary dependencies for the new setup.
- Created a new workflow in `deploy.yml` to automate the deployment of documentation using Nextra.
- Configured the workflow to trigger on pushes to the main branch and allow manual dispatch.
- Set up steps for checking out the repository, installing dependencies, generating files, building the static site, and deploying to GitHub Pages with custom domain support.
@gbarros gbarros requested review from Copilot and jcstein December 12, 2025 19:34
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gbarros, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the documentation site's build and deployment infrastructure to prepare it for live deployment. The changes focus on simplifying the static export process, automating deployments via GitHub Actions, and removing complex custom redirect handling in favor of a more straightforward setup. This streamlines the development workflow and ensures a consistent, maintainable static site.

Highlights

  • Automated Deployment: A new GitHub Actions workflow has been introduced to automate the deployment of the static documentation site to GitHub Pages, covering building, asset generation, and custom domain deployment.
  • Simplified Next.js Configuration: The next.config.mjs file now consistently uses output: 'export' for static site generation, removing conditional logic and custom redirect handling, and also cleaning up unused imports.
  • Streamlined Build and Start Scripts: Build and start scripts in package.json have been updated to align with the new static export process, removing specific static build commands and utilizing the serve package for local serving.
  • Removed Custom Redirects: The redirects.json file and all associated logic for handling custom redirects have been completely removed from the Next.js configuration and the link-checking script.
  • Updated Link Checker: The scripts/check-links.mjs script has been modified to no longer consider custom redirects, focusing solely on validating existing routes, simplifying its logic.
  • Dependency Updates: The yarn.lock file has been updated to reflect the addition of the serve package and other related dependency changes, ensuring a consistent and up-to-date project environment.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/deploy.yml
    • .github/workflows/preview.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prepares the documentation site for live deployment by simplifying the build process to use static exports exclusively and automating deployment to GitHub Pages. The changes eliminate conditional export logic and custom redirect handling in favor of a more maintainable static-first approach.

Key changes:

  • Automated GitHub Pages deployment workflow with custom domain support
  • Simplified Next.js configuration to always use static export mode
  • Removed redirect handling system and cleaned up related dependencies

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/deploy.yml New workflow to build and deploy static site to GitHub Pages with custom domain
.github/workflows/preview.yaml Updated to use standard build command instead of custom static build script
next.config.mjs Removed conditional export logic, redirect handling, and unused imports
package.json Updated build scripts for static-only workflow and added serve package
redirects.json Removed redirect configuration file
scripts/check-links.mjs Removed redirect validation logic from link checker

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/deploy.yml
Comment thread package.json
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the Next.js build process by enforcing static exports, removing conditional logic for STATIC_EXPORT environment variables, and eliminating the redirects.json file along with its processing in next.config.mjs and the check-links.mjs script. The package.json scripts are updated to reflect these changes, including using the serve package to serve the static output, and yarn.lock is updated for the new dependencies. A review comment suggests optimizing the start script by directly calling serve out instead of npx serve out.

Comment thread package.json Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

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

LGTM!

@jcstein jcstein merged commit bb8931c into docs-glow-up Dec 12, 2025
2 of 3 checks passed
@jcstein jcstein deleted the gb/remove-redirects branch December 12, 2025 21:58
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.

3 participants