From 6cb3699016096488a1ef04cfcb4c674258b19afd Mon Sep 17 00:00:00 2001 From: Matthew McKinnon Date: Sat, 6 Sep 2025 19:20:30 +1000 Subject: [PATCH] fix: update to deploy on correct location --- .gitea/workflows/production.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/production.yml b/.gitea/workflows/production.yml index 9f5a195..ce754a0 100644 --- a/.gitea/workflows/production.yml +++ b/.gitea/workflows/production.yml @@ -47,6 +47,7 @@ jobs: DEPLOY_USER: administrator DEPLOY_HOST: docker.comprofix.xyz DEPLOY_PATH: /opt/comprofix + VERSION: ${{ github.ref_name }} # <-- get the tag that triggered this workflow steps: - uses: actions/checkout@v4 @@ -65,11 +66,8 @@ jobs: echo "Deploying production container..." ssh -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_HOST " cd $DEPLOY_PATH - # Extract Git tag that triggered the workflow - VERSION=\${GITHUB_REF#refs/tags/} - - # Update IMAGE_TAG in .env.production - sed -i 's/^IMAGE_TAG=.*/IMAGE_TAG=\$VERSION/' .env.production + # Replace IMAGE_TAG with the version from CI + sed -i 's/^IMAGE_TAG=.*/IMAGE_TAG=${VERSION}/' .env.production # Stop old container, pull new image, start container docker compose --env-file .env.production down --remove-orphans