mirror of
https://github.com/a-sync/game-server-watcher.git
synced 2026-07-11 16:31:56 -04:00
37 lines
963 B
YAML
37 lines
963 B
YAML
name: 3. ☁️ Deploy to the cloud
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
concurrency:
|
|
group: deployment
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy:
|
|
name: 🚀 Deploy app
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
|
|
steps:
|
|
- name: 🚚 Get latest code
|
|
uses: actions/checkout@v4
|
|
|
|
- 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 --yes --ha=false --primary-region=${{ secrets.FLY_REGION }} --regions=${{ secrets.FLY_REGION }} --app=${{ env.APP_NAME }}
|