From 06dfc3ad6cec6d8c0491d7032489bdefbaac6853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ru=C3=A1n=20Murgatroyd?= Date: Fri, 29 Mar 2024 00:04:37 +0000 Subject: [PATCH] I just want it to work --- .github/workflows/deploy-to-vps.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-to-vps.yaml b/.github/workflows/deploy-to-vps.yaml index 71a0179..c69fd5d 100644 --- a/.github/workflows/deploy-to-vps.yaml +++ b/.github/workflows/deploy-to-vps.yaml @@ -22,14 +22,11 @@ jobs: EXPOSED_PORT: ${{ secrets.EXPOSED_PORT }} run: | ssh -o StrictHostKeyChecking=no ${{ secrets.USERNAME }}@${{ secrets.HOST }} << 'EOF' - cd /src/Website - - # Pull the latest changes - git pull origin master - - # Add the .env - echo "EXPOSED_PORT=${EXPOSED_PORT}" > .env - - # Use Docker Compose to rebuild and restart the container with the new image - docker compose up -d --build + cd /src/Website + touch .env + chmod 644 .env + echo "EXPOSED_PORT=\${EXPOSED_PORT}" > .env + git reset --hard HEAD + git pull origin master + docker-compose up -d --build EOF