Skip to content

import HOST

import HOST #3

Workflow file for this run

name: Deploy Application
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.4.0'
- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
working-directory: ./backend
- name: Fetch DATABASE_URL from Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: |
DATABASE_URL=$(heroku config:get DATABASE_URL -a aiman-db)
echo "DATABASE_URL=${DATABASE_URL}" >> $GITHUB_ENV
- name: Run setup script
run: |
chmod +x ./backend/bin/bash.sh
./backend/bin/bash.sh
env:
DATABASE_URL: ${{ env.DATABASE_URL }}