Skip to content

Commit

Permalink
dev environment isolation
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsam committed Mar 24, 2024
1 parent 4d3b575 commit a197523
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- dev

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -105,14 +106,30 @@ jobs:
name: πŸš€ Deploy
runs-on: ubuntu-latest
needs: [lint, typecheck, vitest, migration]
if: ${{ github.ref_name == 'main' || github.ref_name == 'dev'}}

steps:
- name: πŸ‘€ Checkout repo
uses: actions/checkout@v4

- name: πŸš€ Deploy
uses: superfly/[email protected]
- name: 🧐 Read app name
uses: SebRollen/[email protected]
id: app_name
with:
args: "deploy"
file: "fly.toml"
field: "app"

- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/[email protected]

- name: πŸš€ Deploy Staging
if: ${{ github.ref_name = 'main'}}
run: flyctl deploy --remote-only --app ${{ steps.app_name.outputs.value }}-staging
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: πŸš€ Deploy Production
if: ${{ github.ref_name = 'main'}}
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 comments on commit a197523

Please sign in to comment.