Merge pull request #214 from jackmisner/improve-validation-error-mess… #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Backend to Fly.io | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['backend/**'] | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| name: Deploy Backend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Fly CLI | |
| uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Deploy to Fly.io | |
| run: flyctl deploy --remote-only --app brewtracker-backend | |
| working-directory: ./backend | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| - name: Health Check | |
| run: | | |
| sleep 30 | |
| curl -f https://brewtracker-backend.fly.dev/api/health || exit 1 | |
| - name: Notify Success | |
| if: success() | |
| run: echo "✅ Backend deployed successfully to https://brewtracker-backend.fly.dev" | |
| - name: Notify Failure | |
| if: failure() | |
| run: echo "❌ Backend deployment failed. Check logs above." |