Skip to content

Commit cbd1632

Browse files
authored
FEAT: Adds deployment automations (#19)
* feat: Writes fly.io configuration file * feat: Adds a workflow to deploy to fly.io
1 parent ee95ef4 commit cbd1632

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/deploy.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
name: 🚀 Deploy to Fly
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
deploy:
10+
name: Deploy app
11+
runs-on: ubuntu-latest
12+
concurrency: deploy-group
13+
steps:
14+
- name: Checkout 🛎️
15+
uses: actions/checkout@v4
16+
- name: Setup Fly 🧰
17+
uses: superfly/flyctl-actions/setup-flyctl@master
18+
- name: Deploy to Fly.io 🛩️
19+
run: flyctl deploy --remote-only
20+
env:
21+
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}

fly.toml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
app = 'web-check-api'
2+
primary_region = 'lhr'
3+
4+
[build]
5+
6+
[deploy]
7+
strategy = "bluegreen"
8+
9+
[http_service]
10+
internal_port = 8080
11+
force_https = true
12+
auto_stop_machines = true
13+
auto_start_machines = true
14+
min_machines_running = 0
15+
processes = ['app']
16+
17+
[[vm]]
18+
memory = '1gb'
19+
cpu_kind = 'shared'
20+
cpus = 1

0 commit comments

Comments
 (0)