Update workflows for preview deployment and branch deletion #7
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: Production Deployment | |
on: | |
push: | |
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 | |
with: | |
node-version: 18 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run Migrations | |
run: pnpm run db:migrate | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only |