Deploy to Production #3
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 to Production | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Fly CLI | |
| uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Generate fly.toml | |
| run: | | |
| set -a | |
| source .env.production | |
| set +a | |
| envsubst < fly.toml.template > fly.toml | |
| cat fly.toml | |
| - name: Deploy to Fly.io | |
| run: | | |
| GIT_SHA="${{ github.sha }}" | |
| flyctl deploy --remote-only --build-arg CACHE_BUST="$GIT_SHA" | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |