Feature/fly cd pipeline #2
Workflow file for this run
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 demo | |
| # PRs: validates fly.toml config (no deploy) | |
| # Merge to main: validates then deploys to lyftr-demo.fly.dev | |
| # | |
| # Required secret: FLY_API_TOKEN | |
| # fly tokens create deploy -a lyftr-demo | |
| # Add to: GitHub repo → Settings → Secrets and variables → Actions | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| validate: | |
| name: Validate fly.toml | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Validate config | |
| run: flyctl config validate | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| deploy: | |
| name: Deploy to Fly.io | |
| needs: validate | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: superfly/flyctl-actions/setup-flyctl@master | |
| # --remote-only: skip local Docker build, use Fly's Depot builder instead. | |
| # fly.toml in repo root points to fly/Dockerfile as the build target. | |
| - name: Deploy | |
| run: flyctl deploy --remote-only | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |