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>
This commit is contained in:
Kpa-clawbotandCopilot committed 2026-03-26 22:00:10 -07:00
1 parent be9ea08621
commit 5bc7087b83
1 file changed
+14 -5
+14 -5
View File
@@ -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