Skip to content

Commit

Permalink
Update deploy-production.yml
Browse files Browse the repository at this point in the history
Truncate step names
Move env variables for this one down to the steps that require them. We've explained in other files where they are needed.
  • Loading branch information
clarkbw authored May 7, 2024
1 parent b852866 commit f971d8e
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,27 @@ on:
branches:
- 'main'

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}

jobs:
deploy-production:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js 18
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'

- name: Install dependencies
run: pnpm install


- name: Run Migrations
run: pnpm run db:migrate

- run: pnpm install
- run: pnpm run db:migrate
env: # production database URL from secrets
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
- run: flyctl deploy --remote-only
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 comments on commit f971d8e

Please sign in to comment.