Skip to content

Commit

Permalink
Use sudo for build command in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Suhas-G authored Jul 28, 2022
1 parent dce7343 commit 695d839
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
- name: Deploy through proxy
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
uses: appleboy/ssh-action@master

env:
PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USERNAME }}
Expand All @@ -34,8 +35,9 @@ jobs:
proxy_password: ${{ secrets.PROXY_PASSWORD }}
proxy_port: ${{ secrets.PROXY_PORT }}
script_stop: true
envs: PASSWORD
script: |
cd VisualCircuit
docker-compose stop
echo "$PASSWORD" | sudo -S docker-compose stop
git pull
docker-compose up --build -d
echo "$PASSWORD" | sudo -S docker-compose up --build -d

0 comments on commit 695d839

Please sign in to comment.