diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c2a4228..eb4f9bb 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -86,7 +86,7 @@ jobs: sed -i "s||$ESCAPED|g" docker/${{ matrix.env }}/stack-config/timetable.yaml ESCAPED=$(printf '%s' "$TIMETABLE_JDBC_DATABASE_PASSWORD" | sed 's/&/\\&/g') sed -i "s||$ESCAPED|g" docker/${{ matrix.env }}/stack-config/timetable.yaml - - name: Copy files to remote + - name: Copy stack config to remote if: steps.check.outputs.should_deploy == 'true' uses: burnett01/rsync-deployments@7.0.2 with: @@ -97,6 +97,17 @@ jobs: remote_port: ${{ secrets.DEPLOY_PORT }} remote_user: ${{ secrets.DEPLOY_USER }} remote_key: ${{ secrets.DEPLOY_KEY }} + - name: Copy nginx stack config to remote + if: steps.check.outputs.should_deploy == 'true' + uses: burnett01/rsync-deployments@7.0.2 + with: + switches: -az -r --del + path: docker/${{ matrix.env }}/nginx.yaml + remote_path: ~/ + remote_host: ${{ secrets.DEPLOY_HOST }} + remote_port: ${{ secrets.DEPLOY_PORT }} + remote_user: ${{ secrets.DEPLOY_USER }} + remote_key: ${{ secrets.DEPLOY_KEY }} - name: Deploy applications if: steps.check.outputs.should_deploy == 'true' uses: appleboy/ssh-action@v1 @@ -111,4 +122,7 @@ jobs: IMAGE=$(grep -oE 'image: *[^ ]+' "$f" | sed 's/^image: *//') docker pull "$IMAGE" docker stack deploy -c "$f" "$NAME" --detach=false - done \ No newline at end of file + done + IMAGE=$(grep -oE 'image: *[^ ]+' ~/nginx.yaml | sed 's/^image: *//') + docker pull "$IMAGE" + docker stack deploy -c ~/nginx.yaml nginx --detach=false \ No newline at end of file diff --git a/docker/test/stack-config/nginx.yaml b/docker/test/nginx.yaml similarity index 100% rename from docker/test/stack-config/nginx.yaml rename to docker/test/nginx.yaml