From 5bc7087b832b6bc35fdee8c0a2e882687597159f Mon Sep 17 00:00:00 2001 From: Kpa-clawbot <259247574+Kpa-clawbot@users.noreply.github.com> Date: Thu, 26 Mar 2026 22:00:10 -0700 Subject: [PATCH] fix: deploy step uses repo checkout for docker compose The deploy job was cd-ing to /opt/meshcore-deploy which has no docker-compose.yml. Now runs compose from the repo checkout and copies compose file to deploy dir for manage.sh. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/deploy.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7ebcd094..d89bf678 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -165,17 +165,26 @@ jobs: - name: Deploy to staging run: | set -e - cd /opt/meshcore-deploy - # Source environment overrides - if [ -f .env ]; then - set -a; source .env; set +a + # Source environment overrides from deploy dir or home + if [ -f /opt/meshcore-deploy/.env ]; then + set -a; source /opt/meshcore-deploy/.env; set +a + echo "Sourced /opt/meshcore-deploy/.env" + elif [ -f "$HOME/.env" ]; then + set -a; source "$HOME/.env"; set +a + echo "Sourced $HOME/.env" + else + echo "No .env found, using defaults" fi # Ensure data directories exist mkdir -p "${PROD_DATA_DIR:-$HOME/meshcore-data}" "${STAGING_DATA_DIR:-$HOME/meshcore-staging-data}" - # Restart staging with the newly built image + # Copy compose file to deploy dir so manage.sh can use it + mkdir -p /opt/meshcore-deploy + cp docker-compose.yml /opt/meshcore-deploy/docker-compose.yml + + # Run compose from the repo checkout (where docker-compose.yml lives) docker compose --profile staging up -d --force-recreate staging # Wait for Docker healthcheck to report healthy