Skip to content

Commit

Permalink
Map main to staging env, prod to prod env
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldon-b committed Feb 21, 2025
1 parent ec3f12b commit d3dbfda
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: 🚀 Deploy
on:
push:
branches:
- prod
- main
- dev
pull_request:

concurrency:
Expand Down Expand Up @@ -114,8 +114,8 @@ jobs:
name: 🚀 Deploy
runs-on: ubuntu-latest
needs: [lint, typecheck, vitest, cypress]
# only deploy main/dev branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }}
# only deploy prod/main branch on pushes
if: ${{ (github.ref == 'refs/heads/prod' || github.ref == 'refs/heads/main') && github.event_name == 'push' }}

steps:
- name: ⬇️ Checkout repo
Expand All @@ -132,13 +132,13 @@ jobs:
uses: superfly/flyctl-actions/setup-flyctl@v1

- name: 🚀 Deploy Staging
if: ${{ github.ref == 'refs/heads/dev' }}
if: ${{ github.ref == 'refs/heads/main' }}
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' }}
if: ${{ github.ref == 'refs/heads/prod' }}
run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app ${{ steps.app_name.outputs.value }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 comments on commit d3dbfda

Please sign in to comment.