Skip to content

Admin Web App — Deployment

The admin portal is deployed to Cloudflare Pages via GitHub Actions, following the same pattern as the customer web app. Staging is the only active environment.


Environments

EnvironmentURLAPIStatus
Stagingstaging-admin.semalink.africastaging-arc.semalink.africa✅ Live
Productionadmin.semalink.africaarc.semalink.africa⬜ Not yet set up

Cloudflare Pages Projects

Project NameCustom DomainBranch
semalink-admin-stagingstaging-admin.semalink.africamain (Pages)

The Pages project uses branch: main in the cloudflare/pages-action@v1 step — this sets the CF deployment alias to main, which is what gets the custom domain attached.


GitHub Actions Workflow

File: .github/workflows/deploy-staging.yml in the semalink-admin repo.

Trigger: push to staging branch, or manual workflow_dispatch.

Steps:

  1. Checkout code
  2. Install Node 22 + npm ci
  3. Build with npm run build (injects VITE_API_BASE_URL and VITE_ENV=staging)
  4. Deploy dist/ to Cloudflare Pages via cloudflare/pages-action@v1
  5. Notify Slack on success or failure

GitHub Environment Secrets

All secrets live in the staging environment on the semalink-admin repo (Settings → Environments → staging):

SecretValue
VITE_API_BASE_URLhttps://staging-arc.semalink.africa
CLOUDFLARE_API_TOKENCF API token with Pages write permission
CLOUDFLARE_ACCOUNT_IDa9e39304b10e79b6b6e7c73a128b8ce7
SLACK_WEBHOOK_URLSlack Incoming Webhook URL

DNS

RecordTypeTarget
staging-adminCNAMEsemalink-admin-staging.pages.dev
adminCNAMEsemalink-admin.pages.dev (not yet live)

All records are proxied through Cloudflare (orange cloud).


How to Deploy

A deploy runs automatically on every push to the staging branch. To trigger manually:

  1. Go to GitHub → semalink-admin → Actions → Deploy — Staging Admin
  2. Click Run workflow → select staging branch → Run workflow

Rollback

  1. Go to Cloudflare Dashboard → Pages → semalink-admin-staging
  2. Click the Deployments tab
  3. Find the target deployment → Rollback to this deployment

Rollback is instant — no rebuild required.


Production Checklist (not yet done)

  • [ ] Create Cloudflare Pages project semalink-admin
  • [ ] Attach custom domain admin.semalink.africa
  • [ ] Create GitHub Environment prod on semalink-admin repo
  • [ ] Configure Zero Trust application for admin.semalink.africa (restrict to @semalink.africa Google accounts)
  • [ ] Add GitHub Actions production workflow (deploy-prod.yml)
  • [ ] Seed production owner account

Internal use only — Sema Link Engineering