How Deployment Works

This project uses an automated deployment pipeline. Here's the simple explanation:

  1. You push your code changes to GitHub (as covered in Making Changes).
  2. When you want to publish those changes to the website, you create a special "deploy tag" and push it to GitHub.
  3. GitHub automatically builds the website and uploads it to Firebase Hosting β€” no manual steps needed.
  4. You can watch the progress in the GitHub Actions tab.
βœ…
You do not need to run any build commands or touch Google Cloud yourself β€” the automation handles everything once you push the tag.

The Tag Format

Deploy tags follow a specific naming pattern:

YYYYMMDD_NNN_dev_deploy    ← deploys to Development
YYYYMMDD_NNN_prod_deploy   ← deploys to Production
PartMeaningExample
YYYYMMDDToday's date20260615 = 15 June 2026
NNNSequence number (001 for first deploy today, 002 for second, etc.)001
dev or prodWhich environment to deploy todev or prod
_deployFixed suffix(always the same)

Examples:

20260615_001_dev_deploy    ← first dev deploy on 15 June 2026
20260615_001_prod_deploy   ← first prod deploy on 15 June 2026
20260615_002_dev_deploy    ← second dev deploy on the same day

Step-by-Step: Deploy to Development

Always deploy to development first to verify your changes look correct before going live.

  1. Make sure all your changes are committed and pushed to the develop branch:
    git status   # should show "nothing to commit"
    If there are uncommitted changes, commit them first (see Making Changes).
  2. Work out today's tag. If today is 15 June 2026 and this is your first deploy today:
    20260615_001_dev_deploy
  3. Check that this tag doesn't already exist:
    git tag | grep "^20260615"
    If you see 20260615_001_dev_deploy already, use 002 instead.
  4. Create the tag:
    git tag 20260615_001_dev_deploy
  5. Push the tag to GitHub:
    git push git@github-excelcare:Excel-Care-Group/excelcare-webapp.git 20260615_001_dev_deploy
  6. Go to github.com/Excel-Care-Group/excelcare-webapp/actions to watch the deployment. You should see a new workflow run appear within 30 seconds.
  7. Wait for the green βœ… tick. The whole process takes about 3–5 minutes.
  8. Open https://webapp-dev-496513.web.app to verify your changes look correct.

Step-by-Step: Deploy to Production

Only deploy to production once you've verified the changes on development are correct.

  1. Verify everything looks correct on the dev site: webapp-dev-496513.web.app.
  2. Create a production deploy tag (using prod instead of dev):
    git tag 20260615_001_prod_deploy
  3. Push the tag:
    git push git@github-excelcare:Excel-Care-Group/excelcare-webapp.git 20260615_001_prod_deploy
  4. Watch the workflow run in GitHub Actions.
  5. Once the green βœ… appears, open https://webapp-prod-496513.web.app to verify.
🚨
Never push a prod tag without testing on dev first. If something breaks on production, it will be visible to all website visitors immediately.

Watching a Deployment in GitHub Actions

  1. You'll see a list of workflow runs. The newest one at the top will be your deploy.
  2. A yellow spinning circle means it's still running. A green βœ… means success. A red βœ— means it failed.
  3. Click on the run to see the detailed steps. Each step shows what was done and any error messages.

What If a Deployment Fails?

If you see a red βœ— in GitHub Actions:

  1. Click the failed run to open it.
  2. Click on the failed step (shown in red) to expand it and read the error message.
  3. Most common failures and their fixes:
Error MessageWhat It MeansHow to Fix
Permission denied or 403 on Google CloudA GCP permission is missingContact the project owner (samson.sam@excelcaregroup.com.au) to grant the missing permission. See the GCP guide.
Repository not foundGitHub can't access the repoCheck that the WIF secrets are set correctly in GitHub β†’ Settings β†’ Secrets.
pnpm install failsA dependency has a problemCheck if pnpm-lock.yaml is committed. Run pnpm install locally and commit the updated lock file.
Build fails with TypeScript errorsCode has a syntax or type errorRun pnpm check locally to see the errors. Fix them, commit, and push a new tag.
Changing from HTTPS to background trigger not allowedA Cloud Function has a stale deploymentDelete the function in GCP Console β†’ Cloud Functions, then re-tag.

If the Deployment Succeeds but the Site Looks Wrong

Try a hard refresh in your browser:

If still wrong, check the browser's developer console for errors: right-click the page β†’ Inspect β†’ Console tab.

How to Roll Back to a Previous Version

If the new deployment breaks something, you can quickly roll back to the previous version in the Firebase Console:

  1. Go to console.firebase.google.com and select the project.
  2. Click Hosting in the left sidebar.
  3. Under Hosting you'll see a list of recent releases.
  4. Find the last good release, click the three-dot menu next to it, and select Rollback.
  5. The previous version will be restored within seconds.
ℹ️
Rolling back via Firebase Console only restores the website files. It does not affect Cloud Functions or Firestore rules. For full rollbacks, contact the developer.

Quick Reference β€” Deploy Commands

# Get today's date in the right format (Mac/Linux)
date +%Y%m%d

# Deploy to development (replace DATE and NNN)
git tag DATE_NNN_dev_deploy
git push git@github-excelcare:Excel-Care-Group/excelcare-webapp.git DATE_NNN_dev_deploy

# Deploy to production
git tag DATE_NNN_prod_deploy
git push git@github-excelcare:Excel-Care-Group/excelcare-webapp.git DATE_NNN_prod_deploy

# Example for 15 June 2026, first deploy of the day:
git tag 20260615_001_dev_deploy
git push git@github-excelcare:Excel-Care-Group/excelcare-webapp.git 20260615_001_dev_deploy