Skip to content

Commit 048a643

Browse files
authored
Update deployment workflow conditions and health check
Removed check for FLY_API_TOKEN in build-and-deploy condition and updated health check curl command formatting.
1 parent 5365645 commit 048a643

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/fly-io-deploy.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
build-and-deploy:
3838
needs: test-api
3939
runs-on: ubuntu-latest
40-
if: (github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && secrets.FLY_API_TOKEN != ''
40+
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
4141
steps:
4242
- uses: actions/checkout@v3
4343

@@ -65,8 +65,10 @@ jobs:
6565
run: |
6666
DEPLOYMENT_URL="https://${{ steps.deploy.outputs.deployment_url }}"
6767
echo "Testing health endpoint: $DEPLOYMENT_URL/health"
68-
curl -sSf "$DEPLOYMENT_URL/health" -w "\nStatus: %{http_code}\n" || echo "Health check still initializing..."
69-
68+
curl -sSf "$DEPLOYMENT_URL/health" -w "
69+
Status: %{http_code}
70+
" || echo "Health check still initializing..."
71+
7072
- name: Check deployment logs
7173
if: failure()
7274
run: |
@@ -86,5 +88,9 @@ jobs:
8688
issue_number: context.issue.number,
8789
owner: context.repo.owner,
8890
repo: context.repo.repo,
89-
body: `${emoji} Backend deployment to Fly.io: ${status}\n\nAPI URL: https://${{ steps.deploy.outputs.deployment_url }}\n\nUpdate frontend with: \`NEXT_PUBLIC_API_URL=https://${{ steps.deploy.outputs.deployment_url }}\``
91+
body: `${emoji} Backend deployment to Fly.io: ${status}
92+
93+
API URL: https://${{ steps.deploy.outputs.deployment_url }}
94+
95+
Update frontend with: `NEXT_PUBLIC_API_URL=https://${{ steps.deploy.outputs.deployment_url }}``
9096
})

0 commit comments

Comments
 (0)