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 environment | Image repository | Audience | Approval | Verification URL |
|---|---|---|---|---|
Dev | docs-merchant | Merchant-safe documentation | Required | docs.healthsafepay.com |
Test | docs-internal | Full internal documentation | Not required | developers.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 pipeline | Public pipeline | |
|---|---|---|
| Build workflows | build-merchant-private.yml, build-internal-private.yml | build-merchant.yml, build-internal.yml |
| Build trigger | Push to main, or manual dispatch | Manual dispatch only (push trigger commented out) |
| Container registry | fccComnChktAcrDevCentralusprivate | fccComnChktAcrDevCentralus |
| Deploy by comment | /deploy-private (deploy-private.yml) | /deploy (deploy.yml) |
| Deploy manually | deploy-manual-private.yml | deploy-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.
- Confirm the applicable build workflow completed successfully:
build-merchant-private.ymlproduces thedocs-merchantimage forDev.build-internal-private.ymlproduces thedocs-internalimage forTest.
- Open the build's GitHub issue labelled
deployment-requested. - Confirm the issue targets the expected environment. For an internal build, wait for
fix-deployment-issueto change the target fromDevtoTest. - Add the
/deploy-privatecomment to startdeploy-private.yml. It deploysdocs-merchantas releasedocsforDev, anddocs-internalas releasedevelopersforTest. Any other environment fails. - For
Dev, approve the GitHub Environment deployment request when prompted. ForTest, no GitHub Environment approval is required. - Wait for the deployment workflow to finish successfully.
- 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.
- Open private-cluster-deploy-manually in GitHub Actions. For the public pipeline, open deploy-manually.
- Select Run workflow.
- Select
Devfordocs-merchantorTestfordocs-internal. - Enter the image tag as the short commit SHA, for example
a0b93c6. - Start the workflow. Approve the GitHub Environment request for
Devwhen prompted;Testdoes not require approval. - Wait for the workflow to complete successfully.
- Open the matching verification URL and confirm both the expected audience and documentation change.
Rollbackβ
- Identify the short commit SHA for the last known good build in the target environment's image repository.
- Run the manual deployment workflow with the affected environment and that image tag.
- Wait for the workflow to finish successfully.
- Verify the matching environment URL.
- Record the failed deployment run and tag before retrying a newer build.
Troubleshootingβ
| Symptom | Action |
|---|---|
| Build did not create a usable image | Open the failed build workflow run and resolve the build failure before deploying. |
No build ran after merging to main | Only the private build workflows run on push. Run a public build manually if you need that pipeline. |
/deploy-private does nothing | The comment must be exactly /deploy-private on the build's deployment issue, not on a pull request. |
Unsupported deployment environment | The issue's environment must be Dev or Test. Wait for fix-deployment-issue on internal builds. |
| Deployment workflow fails | Review 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 pulled | Confirm 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. |