diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1344e7cbd..8201fa356 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -116,6 +116,12 @@ jobs: }}-migrations_${{ hashFiles('./prisma/migrations/*/migration.sql') }} + - name: 🌱 Seed Database + if: steps.db-cache.outputs.cache-hit != 'true' + run: npx prisma db seed + env: + MINIMAL_SEED: true + - name: 🏗 Build run: npm run build @@ -156,20 +162,20 @@ jobs: mv ./other/Dockerfile ./Dockerfile mv ./other/.dockerignore ./.dockerignore + - name: 🎈 Setup Fly + uses: superfly/flyctl-actions/setup-flyctl@v1.4 + - name: 🚀 Deploy Staging if: ${{ github.ref == 'refs/heads/dev' }} - uses: superfly/flyctl-actions@1.3 - with: - args: - 'deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app - ${{ steps.app_name.outputs.value }}-staging' + run: + flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} + --app ${{ steps.app_name.outputs.value }}-staging env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} - name: 🚀 Deploy Production if: ${{ github.ref == 'refs/heads/main' }} - uses: superfly/flyctl-actions@1.3 - with: - args: 'deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}' + run: + flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}