CI: combine build and deploy into single job
Some checks failed
Build & Deploy / build (push) Failing after 4m3s
Some checks failed
Build & Deploy / build (push) Failing after 4m3s
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user