Checking access…

Skip to main content

Documentation Deployment Runbook

Use this runbook to deploy the documentation site to its Dev or Test environment. Images are built from main.

Environment Mapping​

GitHub environmentImage repositoryAudienceApprovalVerification URL
Devdocs-merchantMerchant-safe documentationRequireddocs.healthsafepay.com
Testdocs-internalFull internal documentationNot requireddevelopers.healthsafepay.com

The environment selects its Helm values file and image repository. Deploy the merchant image only to Dev and the internal image only to Test.

Dev deployment approval is configured in the GitHub Environment because docs.healthsafepay.com is merchant-facing. Test deployments to developers.healthsafepay.com do not require GitHub Environment approval.

Pipelines​

Two sets of workflows exist. Only the private cluster pipeline builds automatically.

Private cluster pipelinePublic pipeline
Build workflowsbuild-merchant-private.yml, build-internal-private.ymlbuild-merchant.yml, build-internal.yml
Build triggerPush to main, or manual dispatchManual dispatch only (push trigger commented out)
Container registryfccComnChktAcrDevCentralusprivatefccComnChktAcrDevCentralus
Deploy by comment/deploy-private (deploy-private.yml)/deploy (deploy.yml)
Deploy manuallydeploy-manual-private.ymldeploy-manual.yml

The Helm values files (deployment/config/helm/values-dev.yaml and values-test.yaml) point image.repository at the private registry. Deploy images built by the private pipeline unless you know the target cluster uses the public registry.

Pull requests to main run pr-build-check.yml. It builds both audiences, pushes no image, and creates no deployment issue.

Automatic Deployment​

Use the automatic path after a successful push to main. The examples use the private pipeline; for the public pipeline, run its build workflow manually and use /deploy and deploy.yml instead.

  1. Confirm the applicable build workflow completed successfully:
    • build-merchant-private.yml produces the docs-merchant image for Dev.
    • build-internal-private.yml produces the docs-internal image for Test.
  2. Open the build's GitHub issue labelled deployment-requested.
  3. Confirm the issue targets the expected environment. For an internal build, wait for fix-deployment-issue to change the target from Dev to Test.
  4. Add the /deploy-private comment to start deploy-private.yml. It deploys docs-merchant as release docs for Dev, and docs-internal as release developers for Test. Any other environment fails.
  5. For Dev, approve the GitHub Environment deployment request when prompted. For Test, no GitHub Environment approval is required.
  6. Wait for the deployment workflow to finish successfully.
  7. Open the verification URL and confirm the deployed documentation change is present.

Manual Deployment​

Use a manual deployment to retry a failed deployment, deploy a known build, or roll back.

Before starting, locate the short commit SHA from a successful build in the image repository for the target environment.

  1. Open private-cluster-deploy-manually in GitHub Actions. For the public pipeline, open deploy-manually.
  2. Select Run workflow.
  3. Select Dev for docs-merchant or Test for docs-internal.
  4. Enter the image tag as the short commit SHA, for example a0b93c6.
  5. Start the workflow. Approve the GitHub Environment request for Dev when prompted; Test does not require approval.
  6. Wait for the workflow to complete successfully.
  7. Open the matching verification URL and confirm both the expected audience and documentation change.

Rollback​

  1. Identify the short commit SHA for the last known good build in the target environment's image repository.
  2. Run the manual deployment workflow with the affected environment and that image tag.
  3. Wait for the workflow to finish successfully.
  4. Verify the matching environment URL.
  5. Record the failed deployment run and tag before retrying a newer build.

Troubleshooting​

SymptomAction
Build did not create a usable imageOpen the failed build workflow run and resolve the build failure before deploying.
No build ran after merging to mainOnly the private build workflows run on push. Run a public build manually if you need that pipeline.
/deploy-private does nothingThe comment must be exactly /deploy-private on the build's deployment issue, not on a pull request.
Unsupported deployment environmentThe issue's environment must be Dev or Test. Wait for fix-deployment-issue on internal builds.
Deployment workflow failsReview the failed workflow run, confirm the selected environment and image tag, then retry with the last known good tag if a rollback is required.
Image cannot be pulledConfirm the tag exists in the corresponding ACR repository (docs-merchant for Dev, docs-internal for Test) in the registry the Helm values file points to.