CI: combine build and deploy into single job
Some checks failed
Build & Deploy / build (push) Has been cancelled

This commit is contained in:
2026-06-08 18:39:26 +03:00
parent 52b0cf5e99
commit 8102e08b07

View File

@@ -14,20 +14,15 @@ jobs:
- name: Build Docker image
run: docker build -t barotrauma-server:${{ github.sha }} .
deploy:
if: github.ref_name == 'release'
runs-on: [ ubuntu-22.04 ]
needs: build
steps:
- uses: actions/checkout@v4
- name: Tag and push to local registry
if: github.ref_name == 'release'
run: |
docker tag barotrauma-server:${{ github.sha }} \
${{ secrets.REGISTRY_ADDR }}/barotrauma-server:latest
docker push ${{ secrets.REGISTRY_ADDR }}/barotrauma-server:latest
- name: Deploy via SSH
if: github.ref_name == 'release'
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.SERVER_HOST }}