CI/CD Workflows
GitHub Actions Workflows
The Quantum Advantage Tracker utilizes GitHub Actions to automate code quality checks and streamline the deployment process. These workflows ensure that every contribution adheres to the project's standards and that the live site remains up-to-date with the main branch.
Code Quality (Linting and Build Validation)
To maintain a stable codebase, a validation workflow is triggered on every Pull Request targeting the main branch. This workflow performs the following steps:
- Dependency Installation: Runs
npm installto ensure all required packages are present. - Linting & Formatting: Executes linting scripts to verify code style and catch potential errors in TypeScript and CSS.
- Production Build: Runs
npm run build. Since the project is configured for static export (output: 'export'), this step confirms that the Next.js application can successfully generate static assets without errors.
Contributors can run these checks locally before pushing code:
# Run linting
npm run lint
# Validate the production build
npm run build
Deployment to GitHub Pages
The production website is hosted via GitHub Pages. Deployment is fully automated and occurs whenever changes are merged into the main branch.
- Trigger: Push to the
mainbranch. - Process: The workflow builds the application, exports the static files to an
out/directory, and uploads the results as a deployment artifact. - Environment: The site is accessible at https://quantum-advantage-tracker.github.io.
CI/CD Configuration
The build process is influenced by specific environment variables defined in the workflow files and next.config.ts.
PAGES_BASE_PATH
Because the site may be hosted under a specific sub-path on GitHub Pages, the PAGES_BASE_PATH environment variable is used during the build process to prefix links and asset paths correctly.
| Variable | Description | Usage in Code |
| :--- | :--- | :--- |
| PAGES_BASE_PATH | The root path of the deployed site (e.g., /repo-name). | Configures basePath in next.config.ts. |
Manual Execution
Maintainers can manually trigger workflows from the Actions tab of the GitHub repository if a redeployment is necessary without a code change (e.g., to refresh data pulled from external sources or issues).