diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 16ab592..6381504 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -74,12 +74,19 @@ jobs: cd ${{ secrets.DEPLOY_PATH }} echo "Logged into server: $(pwd)" + # Log into GHCR on mara + echo "Logging into GHCR..." + echo ${{ secrets.DOCKER_REGISTRY_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + echo "GHCR login completed." + + # Pull the specific image version built in this workflow # Using the Git SHA ensures we deploy exactly what was just built + echo "Pulling image ${{ github.sha }}..." docker pull ghcr.io/${{ github.repository_owner }}/maia:${{ github.sha }} # Also pull latest for other services to keep up to date - docker-compose pull redis db + docker compose pull redis db # Uses sed to update the compose file with the new image tag sed -i 's|image: ghcr.io/${{ github.repository_owner }}/maia:.*|image: ghcr.io/${{ github.repository_owner }}/maia:${{ github.sha }}|g' docker-compose.yml @@ -87,5 +94,5 @@ jobs: # Restart the services using the new image(s) echo "Bringing compose stack down and up with new image..." - docker-compose up -d --force-recreate --remove-orphans api worker db redis + docker compose up -d --force-recreate --remove-orphans api worker db redis echo "Deployment complete!" \ No newline at end of file