Skip to content

Deployments

Van Nguyen edited this page Jun 26, 2024 · 3 revisions

Production Deployments

Process

Production deployments happen in 3 phases:

  1. Manual New Release action is run, which updates the version in package.json and creates a PR with this change.
  2. After merging the above PR, Build New Release is automatically triggered. This builds a production version of the site and creates a PR with these changes against the gh-pages branch.
  3. After merging the above PR, pages-build-deployment is automatically triggered. This takes the contents of the gh-pages branch and uploads it to the production website.

How to deploy

New release/version

In the case where we want a new build of the site, along with changing the version (i.e. upgrading the site from 9.0.1 -> 9.1.0), we can manually run the New Release action, with our desired version as the parameter. Afterwards, we will need to close, re-open, then merge the automated PR. This should create a new release + tag automatically. After that, we will need to merge the next automated PR. The new version of the site should be deployed in a couple of minutes after that.

Rollback to previous version

In the case of a major bug in the newest version, we may want to rollback to a previous version for quick mitigation. To do so, find the corresponding Build New Release action you want to rollback to. Open it and click "Re-run all jobs" in the top right. image The re-run will show a failure (due to being unable to create a release + tag that already exists), but the automated PR into the gh-pages branch will still be created, and you can merge that to rollback the site.

Redeploy current version with a new build

In the case of non-code changes that need to be incorporated into the site, such as envfile changes, we may want to redeploy the current version, but with a new build. To do so, follow the same steps in Rollback to previous version above, selecting the latest version instead of a previous one.

PR/Beta Deployments

Known Issues

  • If your PR is > 300 files, and the first 300 files happen to be all within the paths-ignore of a specific check, whereas the rest of your files would not be within paths-ignore, your workflow will fail to run.

    Diffs are limited to 300 files. If there are files changed that aren't matched in the first 300 files returned by the filter, the workflow will not run. You may need to create more specific filters so that the workflow will run automatically.

    Source
    Example

TODO