Skip to content

Commit

Permalink
Github workflow updates
Browse files Browse the repository at this point in the history
Make api deployment dependent on successful migrations
Configure ssl for pg to run database migrations

related #277
  • Loading branch information
TangoYankee committed Nov 7, 2024
1 parent a0c203a commit 08db3d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
run: npm run drizzle:migrate
deploy:
name: 🚀 Deploy to production
needs: migrate
environment:
name: production-zoning-api
url: https://zoning-api.nycplanningdigital.com
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
run: npm run drizzle:migrate
deploy:
name: 🚀 Deploy to staging
needs: migrate
environment:
name: staging-zoning-api
url: https://staging-zoning-api.nycplanningdigital.com
Expand Down
3 changes: 3 additions & 0 deletions db/pg-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ export const pgClient = new Client({
user: process.env.DATABASE_USER,
password: process.env.DATABASE_PASSWORD,
database: process.env.DATABASE_NAME!,
ssl: process.env.DATABASE_ENV !== "development" && {
rejectUnauthorized: false,
},
});

0 comments on commit 08db3d9

Please sign in to comment.