Skip to content

Commit 0867f77

Browse files
committed
fix: build context path correction
1 parent 3a95774 commit 0867f77

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/fly-deploy.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1+
# .github/workflows/deploy-backend.yml
12
name: Deploy Backend to Fly.io
23

34
on:
5+
workflow_dispatch: # Manual trigger
46
push:
57
branches:
6-
- main # Automatic deploy on main branch push
7-
workflow_dispatch: # Manual trigger from Actions tab
8-
8+
- main # Also triggers on main branch
99

1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
13+
1314
steps:
14-
# Step 1: Checkout code
15-
- uses: actions/checkout@v3
15+
# Step 1: Checkout the repo
16+
- name: Checkout code
17+
uses: actions/checkout@v3
1618

1719
# Step 2: Install Fly CLI
18-
- name: Install Fly.io CLI
20+
- name: Install Fly CLI
1921
run: |
2022
curl -L https://fly.io/install.sh | sh
2123
export PATH="$HOME/.fly/bin:$PATH"
2224
23-
# Step 3: Deploy to Fly.io
24-
- name: Deploy to Fly.io
25+
# Step 3: Fly deploy
26+
- name: Deploy Backend to Fly
2527
env:
2628
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
29+
working-directory: ./backend
2730
run: |
2831
export PATH="$HOME/.fly/bin:$PATH"
29-
fly deploy --remote-only --dockerfile ./backend/Dockerfile --config ./backend/fly.toml
32+
fly deploy --remote-only --config fly.toml --build-context .

0 commit comments

Comments
 (0)