Deploy #85
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 | |
| on: | |
| workflow_run: | |
| workflows: ["CI"] | |
| types: [completed] | |
| branches: [main] | |
| jobs: | |
| deploy: | |
| name: Deploy to Fly.io | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Deploy | |
| run: flyctl deploy --remote-only | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| - name: Smoke check | |
| run: | | |
| for i in 1 2 3 4 5; do | |
| if curl -fsSL https://volable.fly.dev/ | grep -q 'data-role="verdict"'; then | |
| echo "Smoke check passed on attempt $i" | |
| exit 0 | |
| fi | |
| echo "Attempt $i failed; retrying in 10s..." | |
| sleep 10 | |
| done | |
| echo "Smoke check failed after 5 attempts" >&2 | |
| exit 1 |