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 dd089a2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
18 changes: 14 additions & 4 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,23 @@ 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]
with:
args: "deploy"
- name: 🎈 Setup Fly
uses: superfly/flyctl-actions/[email protected]

- name: πŸš€ Deploy Staging
if: ${{ github.ref_name == 'dev'}}
run: flyctl deploy --remote-only --config fly.staging.toml
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 }}
22 changes: 22 additions & 0 deletions fly.staging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# fly.toml app configuration file generated for nichtsam-com-staging on 2024-03-24T12:28:05Z
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "nichtsam-com-staging"
primary_region = "cdg"

[build]

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ["app"]

[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 256

0 comments on commit dd089a2

Please sign in to comment.