Migrate database #43
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
name: Migrate database | |
on: | |
workflow_run: | |
workflows: ['Continuous Deployment'] | |
types: | |
- completed | |
workflow_dispatch: | |
release: | |
types: [published, edited] | |
jobs: | |
migrate: | |
runs-on: ubuntu-latest | |
environment: Migration | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14 | |
- name: Install Node.js dependencies | |
run: yarn | |
- name: Run migrations | |
run: yarn migrate:db | |
env: | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} |