Inside your folder, run vercel link to create a new Vercel project
Inside the generated .vercel folder, save the projectId and orgId from the project.json
Inside GitHub, add VERCEL_TOKEN, VERCEL_ORG_ID, and VERCEL_PROJECT_ID as secrets.
GitHub Secrets
Go back go GitHub and then go to Settings > Secrets and Variables > Actions and create a few New Repository Secrets.
VERCEL_ORG_ID - This is the Vercel Organization ID that you just got.
VERCEL_PROJECT_ID - This is the Vercel Project ID that you just got.
VERCEL_TOKEN - The Vercel token you just got.
DATABASE_URL - This should be the connection URL the application will use to connect to the database via bouncer. In our example it would be: postgres://appuser.secret:[email protected]:6543/postgres?pgbouncer=true"
DATABASE_MIGRATION_URL - This is the connection URL GitHub will use to connect to the database to run the migrations. In our example, this would be: postgresql://postgres:[email protected]:5432/postgres?schema=public.
DATABASE_NAME
DATABASE_SCHEMA
DATABASE_APP_PASSWORD - This is the password for the application user. The migration scripts create the application user, so that's why the password is required.
Done!
After you push the latest code to the repo, the tests and deployment will be triggered.