Skip to content

Deployment Information

Jeffery edited this page Oct 5, 2024 · 16 revisions

How to deploy client

SSG

We make use of static site generation (SSG) to avoid running a node.js server for the frontend. This means that we will have stale data unless we rebuild. This also means that unsupported features must not be used.

Production

Deployment to production is done through workflows:

  1. Create a pull request from master to stable and merge

Important

Make sure you use a rebase merge!!!!!

  1. Cron scheduled deployment of the stable branch every 30 minutes or dispatch of deploy-client-production.yml`

Staging

How to deploy back-end

Production

You will have to dispatch deploy-server.production.yml manually.

Staging

Will automatically be deployed on merge to master through deploy-server.staging.yml

Staging

Frontend: https://uasc-ceebc.web.app/

Backend: https://wdcc-uasc-api-staging.fly.dev/

Production

Frontend: https://uasc.pages.dev/ (Hosted on Cloudflare pages)

Backend: https://wdcc-uasc-api.fly.dev/

Note

The status of the production API and Website can be monitored at https://stats.uptimerobot.com/df4pbd5X0c

Firebase

We have two separate firebase projects for Staging and Prod. The service account for the prod instance will not be shared. Contact any of the contributors for access to the staging service account or client sdk.

Sanity.io

There are two separate projects for sanity, which require different env variables

  • Project shared by local and preview
  • Project shared by staging and production

Secrets

We have a variety of secrets used for deployment.

Google sheet members action

To setup the google sheet members action, we the following secrets:

  • MEMBERS_GOOGLE_SHEET_ID, MEMBERS_GOOGLE_SPREADSHEET_ID - These are obtained from the following:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit?gid=SHEET_ID#gid=SHEET_ID
                                          ^^^^^^^                ^[1]

Note

[1] Note that GOOGLE_SHEET_ID isn't the number sheet_id found in the URL but the one on the bottom left of the google sheet. E.g. Sheet1.

Screenshot 2024-10-05 at 4 06 30 PM

Important

We need to create a google sheet if one doesn't exist yet and share this sheet with the GOOGLE_SERVICE_ACCOUNT_JSON.client_email!

  • GOOGLE_SERVICE_ACCOUNT_JSON - This is just the json generated in google apis

Note

We need to enable the Google Sheets API

Screenshot 2024-10-05 at 3 43 06 PM
  • The other environment variables are self explanatory and required as below:
    • BASE_URL - backend url used to fetch all the users
    • NEXT_PUBLIC_FIREBASE_API_KEY - the public client api key