Deploy 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 Production | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: Commit SHA, branch, or tag to deploy | |
| required: true | |
| workflow_call: | |
| jobs: | |
| deploy: | |
| name: Deploy to Production | |
| runs-on: ubuntu-latest | |
| environment: production | |
| concurrency: | |
| group: deploy-production | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # workflow_dispatch: uses inputs.ref; workflow_call: falls back to github.sha (the release commit) | |
| ref: ${{ inputs.ref || github.sha }} | |
| - run: mkdir -p apps/ssh/docs && curl -sL https://supabase.com/docs/docs.tar.gz | tar -xz -C apps/ssh/docs | |
| - uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # v1 | |
| - run: | | |
| VERSION=${{ github.ref_name }}-$(git rev-parse --short HEAD) | |
| flyctl deploy ../.. --config "$(pwd)/fly.toml" --build-arg VERSION="$VERSION" | |
| working-directory: apps/ssh | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| FLY_APP: ${{ vars.FLY_APP }} |