-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On push to main - Automatically apply migrations - Automatically deploy to staging closes #276
- Loading branch information
1 parent
3a2ef38
commit 3d0b882
Showing
5 changed files
with
61 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: 🎭 Staging | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
migrate: | ||
name: 🧑🚀 Migrate | ||
environment: | ||
name: staging-zoning-api | ||
runs-on: ubuntu-latest | ||
env: | ||
DATABASE_USER: ${{secrets.DATABASE_USER}} | ||
DATABASE_PASSWORD: ${{secrets.DATABASE_PASSWORD}} | ||
DATABASE_NAME: ${{secrets.DATABASE_NAME }} | ||
DATABASE_PORT: ${{secrets.DATABASE_PORT}} | ||
DATABASE_HOST: ${{secrets.DATABASE_HOST}} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
- name: Apply migrations | ||
run: npm run drizzle:migrate | ||
deploy: | ||
name: 🚀 Deploy | ||
environment: | ||
name: staging-zoning-api | ||
url: https://staging-zoning-api.nycplanningdigital.com | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Deploy to Heroku | ||
uses: akhileshns/[email protected] | ||
with: | ||
heroku_email: ${{secrets.HEROKU_EMAIL}} | ||
heroku_api_key: ${{secrets.HEROKU_API_KEY}} | ||
heroku_app_name: ${{secrets.HEROKU_APP_NAME}} | ||
team: ${{secrets.HEROKU_TEAM}} | ||
env: | ||
HD_DATABASE_USER: ${{secrets.DATABASE_USER}} | ||
HD_DATABASE_PASSWORD: ${{secrets.DATABASE_PASSWORD}} | ||
HD_DATABASE_NAME: ${{secrets.DATABASE_NAME}} | ||
HD_DATABASE_PORT: ${{secrets.DATABASE_PORT}} | ||
HD_DATABASE_HOST: ${{secrets.DATABASE_HOST}} | ||
HD_STORAGE_URL: ${{secrets.STORAGE_URL}} | ||
HD_NODE_ENV: ${{secrets.NODE_ENV}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters