Initial template for backend projects using Supabase like BaaS
In the project, there are two github actions workflow for the deploys:
The file deploy-dev.yml
is the workflow to deploy changes to devlopment. This workflow will active when push change in the develop branch. For do this, we need to set some secrets varaibles in the repository in github for the access supabase development project in remote:
DEV_ACCESS_TOKEN
: This is the secret_role keyDEV_PROJECT_ID
: The project_id in supabaseDEV_DB_PASSWORD
: The database passwordDEV_CONNECTION_STRING
: The database conection string
The file deploy-prod.yml
is the workflow to deploy changes to production. This workflow will active when push change in the main branch. For do this, we need to set some secrets varaibles in the repository in github for the access supabase development project in remote:
SUPABASE_ACCESS_TOKEN
: This is the secret_role keySUPABASE_PROJECT_ID
: The project_id in supabaseSUPABASE_DB_PASSWORD
: The database password
-- Las funciones se le añade un prefijo en el nombre para asociarlo a algun subconjunto importate de funciones, como por ejemplo auth__, shop__ -- Si una funcion se crea solamente para ser ejecutada en un trigger entonces su nombre debe estar compuesto por el prefijo + tr + el evento