Skip to content

Commit f47c563

Browse files
Deploy to fly.io
1 parent d24c45a commit f47c563

File tree

4 files changed

+67
-9
lines changed

4 files changed

+67
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
name: Deploy
1+
name: Fly Deploy
22
on:
33
push:
44
branches: [main]
55
workflow_dispatch:
66

7+
env:
8+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
9+
FONTAWESOME_TOKEN: ${{ secrets.FONTAWESOME_TOKEN }}
10+
711
jobs:
812
deploy:
13+
name: Deploy app
914
runs-on: ubuntu-latest
1015
steps:
1116
- name: Checkout
1217
uses: actions/checkout@v3
1318

14-
- name: Build, Push and Release a Docker container to Heroku
15-
uses: gonuit/[email protected]
16-
with:
17-
email: ${{ secrets.HEROKU_EMAIL }}
18-
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
19-
heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
20-
docker_options: --build-arg FONTAWESOME_TOKEN=${{ secrets.FONTAWESOME_TOKEN }}
19+
- name: Deploy
20+
- uses: superfly/flyctl-actions/setup-flyctl@master
21+
- run: flyctl deploy --build-arg FONTAWESOME_TOKEN=${{ env.FONTAWESOME_TOKEN }} --remote-only

.github/workflows/spm.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Update Package.resolved
2+
on:
3+
schedule:
4+
- cron: "0 0 * * 1"
5+
workflow_dispatch:
6+
7+
jobs:
8+
run:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Update Package.resolved
13+
run: |
14+
set -ex
15+
swift package update
16+
swift build
17+
git add Package.resolved
18+
git diff-index --quiet HEAD || git commit -m "Update Package.resolved"
19+
git push origin main

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:lts-slim as node
1+
FROM node:slim as node
22

33
WORKDIR /build
44

fly.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# fly.toml file generated for swiftfiddle-formatter on 2022-09-02T22:59:08+09:00
2+
3+
app = "swiftfiddle-formatter"
4+
kill_signal = "SIGINT"
5+
kill_timeout = 5
6+
processes = []
7+
8+
[env]
9+
10+
[experimental]
11+
allowed_public_ports = []
12+
auto_rollback = true
13+
14+
[[services]]
15+
http_checks = []
16+
internal_port = 8080
17+
processes = ["app"]
18+
protocol = "tcp"
19+
script_checks = []
20+
[services.concurrency]
21+
hard_limit = 25
22+
soft_limit = 20
23+
type = "connections"
24+
25+
[[services.ports]]
26+
force_https = true
27+
handlers = ["http"]
28+
port = 80
29+
30+
[[services.ports]]
31+
handlers = ["tls", "http"]
32+
port = 443
33+
34+
[[services.tcp_checks]]
35+
grace_period = "1s"
36+
interval = "15s"
37+
restart_limit = 0
38+
timeout = "2s"

0 commit comments

Comments
 (0)