From 24cd69c292f92c5cf6b6bc4d7f272e094fcbc01a Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 9 Jun 2024 18:36:37 +0100 Subject: [PATCH 1/2] feat: Writes fly.io configuration file --- fly.toml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fly.toml diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..7e6801c --- /dev/null +++ b/fly.toml @@ -0,0 +1,20 @@ +app = 'web-check-api' +primary_region = 'lhr' + +[build] + +[deploy] + strategy = "bluegreen" + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = true + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 From 779f5c43296ed5b1eb4f3f003440147573fec0eb Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 9 Jun 2024 18:36:55 +0100 Subject: [PATCH 2/2] feat: Adds a workflow to deploy to fly.io --- .github/workflows/deploy.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..fc96a66 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,21 @@ + +name: 🚀 Deploy to Fly +on: + workflow_dispatch: + push: + branches: + - main +jobs: + deploy: + name: Deploy app + runs-on: ubuntu-latest + concurrency: deploy-group + steps: + - name: Checkout 🛎ī¸ + uses: actions/checkout@v4 + - name: Setup Fly 🧰 + uses: superfly/flyctl-actions/setup-flyctl@master + - name: Deploy to Fly.io 🛩ī¸ + run: flyctl deploy --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}