From 73211ed3ac2cf21544a9598ccb44b7ec49932d9c Mon Sep 17 00:00:00 2001 From: rishabh Date: Mon, 14 Jul 2025 13:56:41 +0530 Subject: [PATCH] updated main.yml --- .github/workflows/main.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ab2ac8..731b41a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,16 +23,18 @@ jobs: key: ${{ secrets.EC2_KEY }} script: | echo "🔄 Deploying clientside to EC2..." - cd /home/onehash/frappe-bench/apps/clientside - echo "⬇️ Pulling latest code from v-15 branch..." - git checkout v-15 - git pull upstream v-15 + sudo -u onehash bash -c ' + cd /home/onehash/frappe-bench/apps/clientside - echo "⚙️ Building clientside app..." - bench build --app clientside + echo "⬇️ Pulling latest code from v-15 branch..." + git checkout v-15 + git pull upstream v-15 + echo "⚙️ Building clientside app..." + bench build --app clientside + ' echo "🚀 Restarting supervisor services..." - echo ${{secrets.EC2_PW}} | sudo -S supervisorctl restart all + sudo supervisorctl restart all