diff --git a/.github/workflows/prod-deploy.yaml b/.github/workflows/prod-deploy.yaml new file mode 100644 index 0000000..0ba81a7 --- /dev/null +++ b/.github/workflows/prod-deploy.yaml @@ -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 }} + diff --git a/.github/workflows/staging-deploy.yaml b/.github/workflows/staging-deploy.yaml new file mode 100644 index 0000000..cc89e4f --- /dev/null +++ b/.github/workflows/staging-deploy.yaml @@ -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 }} + diff --git a/fly.staging.toml b/fly.staging.toml new file mode 100644 index 0000000..2eb9165 --- /dev/null +++ b/fly.staging.toml @@ -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"] diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..02c5f88 --- /dev/null +++ b/fly.toml @@ -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"]