From ed6307489841aaff28c3b350a00a51021a2f8df6 Mon Sep 17 00:00:00 2001 From: Sigri Date: Mon, 29 Jan 2024 23:27:27 +0100 Subject: [PATCH] Clean code --- .github/workflows/preprod.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preprod.yml b/.github/workflows/preprod.yml index c6fed72..ec4422f 100644 --- a/.github/workflows/preprod.yml +++ b/.github/workflows/preprod.yml @@ -46,4 +46,10 @@ jobs: SSH_PORT: ${{ secrets.SSH_PORT }} - name: pull & up! - run: ssh staging 'cd /home/realt/docker/RealT-Stats-Preprod && git pull && docker compose --file docker-compose-preprod.yml pull && docker compose --file docker-compose-preprod.yml up -d' + run: | + ssh staging 'export DOCKER_BRANCH=${{ github.ref_name }} + cd /home/realt/docker/stats/${DOCKER_BRANCH} + git pull origin ${{ github.ref_name }} + docker compose --file docker-compose.${{ github.ref_name }}.yml pull + docker login -u ${{ secrets.DOCKER_LOGIN }} -p ${{ secrets.DOCKER_PASSWD }} ${{ secrets.DOCKER_REGISTRY }} + docker compose --project-name ${{ github.ref_name }}-stats --file docker-compose.${{ github.ref_name }}.yml up -d'