diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c51a474..ba5e040 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,14 +2,14 @@ name: Deploy App on: [push] jobs: - deploy: + build: runs-on: ubuntu-22.04 container: volumes: - /var/docker-web:/var/docker-web steps: - uses: actions/checkout@v4 - - name: Deploy with docker-web + - name: Prepare and build app run: | REPO_NAME="${GITHUB_REPOSITORY##*/}" APP_DIR="/var/docker-web/apps/${REPO_NAME}" @@ -19,4 +19,17 @@ jobs: cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/" export COMPOSE_BAKE=false docker rmi "local/${REPO_NAME}" 2>/dev/null || true - bash /var/docker-web/src/cli.sh up "${REPO_NAME}" + bash /var/docker-web/src/cli.sh build "${REPO_NAME}" + + deploy: + runs-on: ubuntu-22.04 + needs: build + container: + volumes: + - /var/docker-web:/var/docker-web + steps: + - uses: actions/checkout@v4 + - name: Deploy with docker-web + run: | + REPO_NAME="${GITHUB_REPOSITORY##*/}" + bash /var/docker-web/src/cli.sh up "${REPO_NAME}" \ No newline at end of file