This repository holds the static content for the BCBS.com Blue Health Equity initiative.
- Gatsby v3+
- Algolia Instantsearch
(TBD)
By default Gatsby will source data from the Drupal stage
environment, which requires you to
be on the Oomph VPN or other whitelisted network. (If you are not on a whitelisted network you
will see HTTP 403 errors.) To configure Gatsby to use a local Drupal environment, create a file
called .env.local
and add content similar to this:
DRUPAL_BASE_URL="https://bcbs.lndo.site/"
NODE_TLS_REJECT_UNAUTHORIZED=0
If you wish to use some other existing environment, you can either copy the appropriate .env.*
file to .env.local
(e.g. copy .env.dev
to .env.local
) or you can run the Gatsby build
with a DEPLOY_ENV
environment variable, e.g.:
DEPLOY_ENV=dev gatsby build
Note that the .env.local
file is ignored by git and should not be committed.
This project uses GitHub Actions for its
CI/CD pipeline. The main workflow builds Gatsby and, for specific cases, deploys the output to AWS S3 buckets. This workflow is triggered by pushing any branch, a semantic tag, or by the GitHub API's
workflow_dispatch
and repository_dispatch
events.
The steps of the workflow are:
- Build Gatsby, retaining its cache between workflow runs
- Archive the Gatsby output
- Sync the archive contents to an AWS S3 bucket
- Clear the AWS Cloudfront cache for the static site
Steps 3-4 will only run for the dev
, uat
, stage
, and master
branches or any tagged releases.
The master
branch would normally be excluded, but this workflow can be triggered by the GitHub API's
workflow_dispatch
and repository_dispatch
events, which use the repository's
default branch.
Note: builds for any non-deployment branches will currently default to using the Drupal stage
environment
as the Drupal data source.