Use Github Actions for easy updates
fly tokens create deploy
FLY_API_TOKEN
.github/workflows/main.yml
deploy: name: 🚀 Deploy runs-on: ubuntu-22.04 needs: [lint, typecheck, vitest] # only build/deploy branches on pushes if: ${{ github.event_name == 'push' }} steps: - name: ⬇️ Checkout repo uses: actions/checkout@v4 - name: 👀 Read app name uses: SebRollen/toml-action@v1.2.0 id: app_name with: file: "fly.toml" field: "app" - name: 🎈 Setup Fly uses: superfly/flyctl-actions/setup-flyctl@1.5 - name: 🚀 Deploy Production if: ${{ github.ref == 'refs/heads/main' }} run: flyctl deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app boringdatabase-demo env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
fly.toml