Skip to content

checkout working ref #11

checkout working ref

checkout working ref #11

Workflow file for this run

name: 🎭 Staging
on:
push:
branches:
- 276/deploy-to-staging
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}}
DATABASE_ENV: ${{secrets.DATABASE_ENV}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: '276/deploy-to-staging'
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Set env variables
run: |
echo "DATABASE_USER=$DATABASE_USER" >> .env
echo "DATABASE_PASSWORD=$DATABASE_PASSWORD" >> .env
echo "DATABASE_NAME=$DATABASE_NAME" >> .env
echo "DATABASE_PORT=$DATABASE_PORT" >> .env
echo "DATABASE_HOST=$DATABASE_HOST" >> .env
echo "DATABASE_ENV=$DATABASE_ENV" >> .env
- name: Apply migrations
run: npm run
deploy:
name: 🚀 Deploy
environment:
name: staging-zoning-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
- 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}}