Files
a301_game_server/.gitea/workflows/deploy.yml
tolelom c07d130a07
Some checks failed
Deploy to Mac Mini / Test (push) Failing after 58s
Deploy to Mac Mini / Deploy (push) Has been skipped
.
2026-02-26 21:35:37 +09:00

43 lines
979 B
YAML

name: Deploy to Mac Mini
on:
push:
branches:
- main
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v4
- name: Setup Go
uses: https://github.com/actions/setup-go@v5
with:
go-version: '1.25'
- name: Run tests
run: go test ./... -race
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: test
steps:
- name: Deploy to Mac Mini via SSH
uses: https://github.com/appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
port: ${{ secrets.DEPLOY_PORT }}
script: |
cd ${{ secrets.DEPLOY_PATH }}
git pull origin main
docker-compose down
docker-compose up -d --build
docker-compose logs --tail=20 server