Skip to content

Deployment

Lavesh Paryani edited this page Sep 26, 2026 · 1 revision

Deployment

Deployment is handled by .github/workflows/deploy.yml, named Multi-Tier Deployment. It runs on every push to main and dev, and can also be started by hand (workflow_dispatch). It does not run on pull requests.

What the workflow does

Both branches share one build job:

  1. Check out the code and set up Node.js 20 with the npm cache.
  2. Install dependencies with npm ci.
  3. Run next build in apps/web with NODE_ENV=production and the base path variables for the branch (see below). The static export lands in apps/web/out.

Then the branches split:

Branch Base path Destination
dev /RestroFX Uploaded as a Pages artifact and deployed by the deploy-github-pages job to https://stackified.github.io/RestroFX/
main none (domain root) Pushed to the deploy-prod branch with JamesIves/github-pages-deploy-action; the Hostinger hosting pulls from that branch

The workflow uses the built-in GITHUB_TOKEN with contents, pages and id-token write permissions. No other secrets are involved. Deploys share one pages concurrency group and are not cancelled mid-run.

Branch flow

feat/... or fix/...  --PR-->  dev  --PR-->  main
                               |              |
                     GitHub Pages build    deploy-prod branch
                     (/RestroFX)           (Hostinger)
  1. Cut a branch from dev (for example feat/discord-floating-button or fix/restricted-jurisdictions, both of which exist in the repository).
  2. Open a pull request into dev. Merging it rebuilds the GitHub Pages site.
  3. Check the change on https://stackified.github.io/RestroFX/.
  4. Open a pull request from dev into main. Merging it produces the production build on deploy-prod.

deploy-prod is generated output. Never commit to it directly; the next production build overwrites it.

Things to keep in mind

  • Because the two builds use different base paths, always use withBasePath() for files in public/ and never hardcode /RestroFX.
  • Pull requests are not built by CI, so run npm run build locally before merging.
  • CodeQL scans the JavaScript and TypeScript code on every push.

Clone this wiki locally