Manual deployment

Using the cf command-line tool, you can run a manual deployment to either
staging or production by targeting the corresponding organization / space
and as long as you have access to cf push the target. More information on
deploying to cloud.gov can be found [here] cg-deploy-hw and [here] cg-deploy-ss.

Manual deployments are not necessary as all deployments should go through
CircleCI.

To check which space you're targeting using the cf command-line tool, type the
following in your terminal.

cf target

Building the vote.gov site locally

The vote.gov site is built using the npm run build command. This command
looks for an environment variable containing the site's base-URL. This URL must
be assigned to the SITE_BASEURL variable before running npm run build and
must be set to the proper value depending on the space you're targeting.

Type the following in your terminal to build the English site for the staging
space:

npm run build

Type the following in your terminal to build the English site for the
production space:

NODE_ENV=production npm run build

Type the following in your terminal to build the Spanish site for the staging
space:

# NOTE: Building the Spanish version of the site is currently experimental
NODE_LANG=spanish npm run build

Type the following in your terminal to build the Spanish site for the
production space:

# NOTE: Building the Spanish version of the site is currently experimental
NODE_LANG=spanish NODE_ENV=production npm run build

Pushing to a target

Once you've built the vote.gov English site locally by running the above
command, you can push your changes up to the targeted space.

Type the following in your terminal to deploy to the staging space:

# NODE: Deploying the Spanish version of the site is experimental
cf push -f manifest-staging.yml

Type the following in your terminal to deploy to the production space:

# NODE: Deploying the Spanish version of the site is experimental
cf push

Vote.usa.gov redirector

During the re-launch of vote.gov, we realised that there were lingering
issues with cached redirects between vote.gov and vote.usa.gov. To
fix this, we created a minimal nginx configuration which: