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
| Environment | URL | API | Status |
|---|---|---|---|
| Staging | staging-admin.semalink.africa | staging-arc.semalink.africa | ✅ Live |
| Production | admin.semalink.africa | arc.semalink.africa | ⬜ Not yet set up |
Cloudflare Pages Projects
| Project Name | Custom Domain | Branch |
|---|---|---|
semalink-admin-staging | staging-admin.semalink.africa | main (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:
- Checkout code
- Install Node 22 +
npm ci - Build with
npm run build(injectsVITE_API_BASE_URLandVITE_ENV=staging) - Deploy
dist/to Cloudflare Pages viacloudflare/pages-action@v1 - Notify Slack on success or failure
GitHub Environment Secrets
All secrets live in the staging environment on the semalink-admin repo (Settings → Environments → staging):
| Secret | Value |
|---|---|
VITE_API_BASE_URL | https://staging-arc.semalink.africa |
CLOUDFLARE_API_TOKEN | CF API token with Pages write permission |
CLOUDFLARE_ACCOUNT_ID | a9e39304b10e79b6b6e7c73a128b8ce7 |
SLACK_WEBHOOK_URL | Slack Incoming Webhook URL |
DNS
| Record | Type | Target |
|---|---|---|
staging-admin | CNAME | semalink-admin-staging.pages.dev |
admin | CNAME | semalink-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:
- Go to GitHub → semalink-admin → Actions → Deploy — Staging Admin
- Click Run workflow → select
stagingbranch → Run workflow
Rollback
- Go to Cloudflare Dashboard → Pages →
semalink-admin-staging - Click the Deployments tab
- 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
prodonsemalink-adminrepo - [ ] Configure Zero Trust application for
admin.semalink.africa(restrict to@semalink.africaGoogle accounts) - [ ] Add GitHub Actions production workflow (
deploy-prod.yml) - [ ] Seed production owner account