chore(deploy): streamline Fly.io pipeline and harden container build #29
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
| # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ | |
| name: Deploy to Fly.io | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: deploy | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Deploy app | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install fly | |
| run: | | |
| curl -L https://fly.io/install.sh | sh | |
| echo "$HOME/.fly/bin" >> "$GITHUB_PATH" | |
| - name: Set secrets | |
| run: fly secrets set --stage MYSQL_CONNECTION_URL="${MYSQL_CONNECTION_URL}" UMAMI_ID="${UMAMI_ID}" | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| MYSQL_CONNECTION_URL: ${{ secrets.MYSQL_CONNECTION_URL }} | |
| UMAMI_ID: ${{ secrets.UMAMI_ID }} | |
| - name: Deploy | |
| run: fly deploy --remote-only | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |