From 1510904537d4259b6d6f08f98e470c39c1200ec0 Mon Sep 17 00:00:00 2001 From: Abhinav232004 Date: Thu, 7 Mar 2024 11:03:20 +0530 Subject: [PATCH] changes --- .github/workflows/docker.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 368eae4..15fcc0f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -81,14 +81,14 @@ jobs: sudo docker-compose -f docker-compose.yml up -d" - # - name: SSH into the VM and edit the nginx file - # run: | - # gcloud compute ssh ${{ secrets.GCP_INSTANCE_NAME}} --zone=${{ secrets.GCP_ZONE }} --command " - # cd /etc/nginx/sites-enabled && - # sudo sh -c grep -E '^\s*try_files \$uri \$uri/ =404;' /etc/nginx/sites-enabled/default | grep -E -v '^\s*#' | sudo sed -i '/^\s*try_files \$uri \$uri\/ =404;/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:8000;' default && - # sudo sh -c grep -E '^\s*try_files \$uri \$uri/ =404;' /etc/nginx/sites-enabled/default | grep -E -v '^\s*#' | sudo sed -i 's/^\(\s*try_files \$uri \$uri\/ =404;\)/# \1/' default && - # sudo systemctl restart nginx - # " + - name: SSH into the VM and edit the nginx file + run: | + gcloud compute ssh ${{ secrets.GCP_INSTANCE_NAME}} --zone=${{ secrets.GCP_ZONE }} --command " + cd /etc/nginx/sites-enabled && + sudo sh -c grep -E '^\s*try_files \$uri \$uri/ =404;' /etc/nginx/sites-enabled/default | grep -E -v '^\s*#' | sudo sed -i '/^\s*try_files \$uri \$uri\/ =404;/a \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ proxy_pass http:\/\/localhost:8000;' default && + sudo sh -c grep -E '^\s*try_files \$uri \$uri/ =404;' /etc/nginx/sites-enabled/default | grep -E -v '^\s*#' | sudo sed -i 's/^\(\s*try_files \$uri \$uri\/ =404;\)/# \1/' default && + sudo systemctl restart nginx + " # - name: SSH into the VM and install certbot for https # env: