This directory contains GitHub Actions workflows for automating various tasks in the Brainstorm application.
The supabase-migrations.yml workflow automatically applies database migrations to your Supabase project when changes are pushed to the main branch.
To use this workflow, you need to set up the following secrets in your GitHub repository:
-
SUPABASE_ACCESS_TOKEN:
- A personal access token for authenticating with Supabase
- Generate this token in the Supabase dashboard under Account → Access Tokens
-
SUPABASE_PROJECT_ID:
- Your Supabase project reference ID
- Found in the URL of your Supabase project:
https://app.supabase.com/project/<project-id>
-
SUPABASE_DB_PASSWORD:
- The database password for your Supabase project
- This is the password you set when creating the project
- Go to your GitHub repository
- Navigate to Settings → Secrets and variables → Actions
- Click on "New repository secret"
- Add each of the secrets mentioned above
- The workflow triggers when changes are pushed to the
mainbranch in thesupabase/migrationsdirectory - It sets up Node.js, installs dependencies and the Supabase CLI
- Links to your Supabase project and runs the migrations
- Provides notifications on success or failure
If the workflow fails, check:
- Are all the required secrets set up correctly?
- Does your Supabase CLI version match the requirements of your migrations?
- Are your migration files valid SQL?
- Do you have the necessary permissions in your Supabase project?