Skip to content

fix: fix conection to db #36

fix: fix conection to db

fix: fix conection to db #36

Workflow file for this run

name: Main
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
PROD_DB_USERNAME: ${{ secrets.PROD_DB_USERNAME }}
PROD_DB_PASSWORD: ${{ secrets.PROD_DB_PASSWORD }}
PROD_DB_NAME: ${{ secrets.PROD_DB_NAME }}
PROD_DB_HOST: ${{ secrets.PROD_DB_HOST }}
PROD_DB_PORT: ${{ secrets.PROD_DB_PORT }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "14.x"
- name: Install dependencies
run: npm install
- name: Install sequlize-cli
run: npm install sequelize-cli
# - name: Undo Migrate DB
# run: npx sequelize db:migrate:undo:all --env production
- name: Migrate DB
run: npx sequelize db:migrate --env production
# - name: Seeding DB
# run: npx sequelize db:seed:all --env production
deploy:
runs-on: ubuntu-latest
needs: [build]
env:
ENV_VARIABLE: PROD
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "secondhand-be"
heroku_email: ${{secrets.HEROKU_EMAIL}}