Skip to content

Scheduled Prod Forms Portal deploy — Spec ​

A one-off, after-hours way to deploy Prod Forms Portal, alongside running prod-formsportal-deploy.yml by hand or via release-test-and-prod.yml. Built from existing parts only: n8n and GitHub Actions.

Flow ​

n8n workflow Schedule Prod Forms Portal Deploy (imported manually; the JSON is not kept in this repo):

  1. Schedule form — n8n Form Trigger at https://n8n.ethosbuilding.cloud/form/2a666ad5-8e86-456f-a9ec-444f80ea34f1. Two optional fields, Deploy date and Deploy time (HH:mm, 24h), and a required Password.
  2. Check password — Code node that compares Password with a constant at the top of its code and throws on a mismatch. The constant is stored in the workflow, so it is also in the hourly n8n-backup commit.
  3. Work out run time — Sydney time (Australia/Sydney): blank date = tomorrow, blank time = 03:00. Rejects a malformed time or a time in the past (a past time would deploy to prod immediately). The form always shows "Submitted", so a rejection is only visible as a failed n8n execution.
  4. Wait until run time — Wait node, resume at a specific time. The execution is stored in n8n's database, so it survives an n8n restart (saveExecutionProgress is on).
  5. Run Prod Forms deploy — GitHub node, Workflow → Dispatch of prod-formsportal-deploy.yml on main.

The deploy itself is unchanged: build, deploy to the staging slot, swap into production.

Operating it ​

  • Cancel a scheduled deploy: stop the waiting execution in n8n (Executions → Waiting).
  • Result: the n8n run only confirms the dispatch; success or failure is the GitHub Actions run.
  • One submission = one deploy. It does not repeat.
  • Deploys whatever main holds at run time, not at submit time.

Setup ​

  • An n8n GitHub credential (githubApi) with a token that has Actions: write on the repo.
  • Replace CHANGE-ME in the Check password node with the real password before activating the workflow.