From 21fb03c9c6c2cd2e168a9b9d42106d70f93b6c31 Mon Sep 17 00:00:00 2001 From: msukkari Date: Fri, 21 Feb 2025 18:45:14 -0800 Subject: [PATCH] change gcp deploy to run commands directly instead of using alias --- .github/workflows/gcp-deploy-staging.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gcp-deploy-staging.yml b/.github/workflows/gcp-deploy-staging.yml index 4fecca07..298d745d 100644 --- a/.github/workflows/gcp-deploy-staging.yml +++ b/.github/workflows/gcp-deploy-staging.yml @@ -22,9 +22,16 @@ jobs: - name: Deploy to GCP run: | ssh -i ~/.ssh/private.key ${{ secrets.GCP_STAGING_USERNAME }}@${{ secrets.GCP_STAGING_HOST }} << 'EOF' - # Stop existing container (if running) - staging_stop || true - - # Start new container - staging_start + # Stop and remove any existing container + docker stop sourcebot-staging || true + docker rm sourcebot-staging || true + + # Run new container + docker run -d \ + -p 80:3000 \ + --pull always \ + --env-file .env.staging \ + -v /mnt/data:/data \ + --name sourcebot-staging \ + ghcr.io/sourcebot-dev/sourcebot:staging EOF \ No newline at end of file