back to single platform #86
This file contains 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 the cloud | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
name: 🚀 Deploy app | |
runs-on: ubuntu-latest | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
name: 🚚 Get latest code | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Set app name | |
run: | | |
if [[ -n "${{ secrets.FLY_APP_NAME }}" ]]; then | |
echo "APP_NAME=${{ secrets.FLY_APP_NAME }}" >> $GITHUB_ENV | |
else | |
echo "APP_NAME=${REPO_OWNER,,}-gsw" >> $GITHUB_ENV | |
fi | |
env: | |
REPO_OWNER: '${{ github.repository_owner }}' | |
- name: 🛩 Deploy to fly.io | |
run: flyctl deploy --remote-only --auto-confirm --regions ${{ secrets.FLY_REGION }} --app ${{ env.APP_NAME }} |