From f8f9ad208fd6685dd0deeaa214f626489f082e3d Mon Sep 17 00:00:00 2001 From: nickschneider Date: Sat, 26 Oct 2024 01:46:37 +0200 Subject: [PATCH] adjusted docker network --- .github/workflows/deploy.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 31fcb5f..9aa3e12 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,15 +25,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Check if Docker network exists and create it if not - run: | - if ! docker network inspect angelos-network >/dev/null 2>&1; then - echo "Network 'angelos-network' does not exist, creating it..." - docker network create angelos-network - else - echo "Network 'angelos-network' already exists." - fi - name: Build and Push to GitHub Container Registry uses: docker/build-push-action@v6 @@ -77,4 +68,9 @@ jobs: proxy_key: ${{ secrets.DEPLOYMENT_GATEWAY_SSH_KEY }} proxy_port: ${{ vars.DEPLOYMENT_GATEWAY_PORT }} script: | + if ! docker network inspect angelos-network >/dev/null 2>&1; then + echo "Network 'angelos-network' does not exist, creating it..." + docker network create angelos-network + fi + docker network ls docker compose -f /home/${{ vars.VM_USERNAME }}/${{ github.repository }}/docker-compose.yml up --pull=always -d