Skip to content

Commit 32e78b0

Browse files
committed
chore: updated workflow
Signed-off-by: alt-ctrl-dev <[email protected]>
1 parent 824f69c commit 32e78b0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/fly-cd.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
name: Fly Deploy
22
on:
3-
workflow_dispatch:
4-
push:
5-
paths:
6-
- '**.ex'
7-
- '**.exs'
8-
- '!**.md'
9-
branches:
10-
- main
3+
release:
4+
types: [published]
115
jobs:
126
deploy:
137
name: Deploy app
148
runs-on: ubuntu-latest
159
environment: production
1610
steps:
1711
- uses: actions/checkout@v3
12+
- name: update APP_VERSION
13+
run: |
14+
sed -i "s#<APP_VERSION>#${{ github.ref_name }}#g" ./fly.toml
1815
- uses: superfly/flyctl-actions/setup-flyctl@master
1916
- run: flyctl deploy --remote-only
17+
name: Publishing v${{ github.ref_name }}
2018
env:
2119
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
20+
APP_VERSION: ${{ github.ref_name }}

fly.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ primary_region = "syd"
77
[env]
88
PHX_HOST = "aba-viewer.fly.dev"
99
PORT = "8080"
10+
APP_VERSION = "<APP_VERSION>"
1011

1112
[http_service]
1213
internal_port = 8080

0 commit comments

Comments
 (0)