Skip to content

Commit

Permalink
Merge pull request #12 from anGie44/flyio-gha
Browse files Browse the repository at this point in the history
CD
  • Loading branch information
anGie44 authored Oct 8, 2023
2 parents e6def39 + ed16a81 commit 47e88e0
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/prod-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Prod Deploy

on:
push:
branches: [main]
paths-ignore:
- README.md
- 'json_examples/**'
- 'models/**'
- .github/workflows/staging-deploy.yaml
- fly.staging.toml


jobs:
deploy:
name: Deploy App
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

24 changes: 24 additions & 0 deletions .github/workflows/staging-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Staging Deploy

on:
pull_request:
paths-ignore:
- README.md
- 'json_examples/**'
- 'models/**'
- .github/workflows/prod-deploy.yaml
- fly.toml


jobs:
deploy:
name: Deploy App
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only -c fly.staging.toml
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

17 changes: 17 additions & 0 deletions fly.staging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fly.staging.toml app configuration file generated for staging-the-office on 2023-10-08T11:24:54-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "staging-the-office"
primary_region = "ewr"

[build]

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
17 changes: 17 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fly.toml app configuration file generated for the-office on 2023-10-08T11:40:22-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "the-office"
primary_region = "ewr"

[build]

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

0 comments on commit 47e88e0

Please sign in to comment.