From 1ce75f4502be53a86726fcd42440f2cb346c5bc7 Mon Sep 17 00:00:00 2001 From: mrzta <108747930+mrzta@users.noreply.github.com> Date: Thu, 12 Feb 2026 23:36:51 +0000 Subject: [PATCH] Update deploy.yaml --- .gitea/workflows/deploy.yaml | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 4e02d26..f21d310 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -12,31 +12,38 @@ jobs: - name: Sync and Launch Nextcloud run: | - # Ensure folder exists and copy the file mkdir -p /opt/docker/nextcloud - cp ./ovh/nextcloud.yml /opt/docker/nextcloud/docker-compose.yml + # Force overwrite the compose file + cp -f ./ovh/nextcloud.yml /opt/docker/nextcloud/docker-compose.yml - # Deploy cd /opt/docker/nextcloud - docker compose up -d --remove-orphans + # Force recreation ensures changes in the .yml are applied + docker compose up -d --force-recreate --remove-orphans - name: Sync and Launch Plex run: | - # Ensure folder exists and copy the file mkdir -p /opt/docker/plex - cp ./ovh/plex.yml /opt/docker/plex/docker-compose.yml + # Force overwrite the compose file + cp -f ./ovh/plex.yml /opt/docker/plex/docker-compose.yml - # Deploy cd /opt/docker/plex - # Note: If the /dev/dri error persists, you must edit the plex.yml in your repo first - docker compose up -d --remove-orphans + # Recreate even if image hasn't changed to ensure config updates + docker compose up -d --force-recreate --remove-orphans - name: Sync and Launch CV run: | + # Clean old files to ensure the build context is fresh + rm -rf /opt/docker/cv/* mkdir -p /opt/docker/cv - # Sync everything in the cv folder (html, dockerfile, etc) + + # Sync entire folder (Dockerfile, index.html, etc) cp -r ./cv/. /opt/docker/cv/ - echo "Shan33779488@@" | docker login g.h-y.st -u zeshan --password-stdin + cd /opt/docker/cv - # Rebuild is necessary here because it's a custom Dockerfile - docker compose up -d --build --remove-orphans \ No newline at end of file + # Build forces Docker to re-read the synced files for the new image + docker compose up -d --build --force-recreate --remove-orphans + + - name: Cleanup + run: | + # Remove dangling images left over from the CV rebuild + docker image prune -f \ No newline at end of file