Closed silasol closed 4 years ago
my actions
- name: executing remote ssh commands using password uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} password: ${{ secrets.PASSWORD }} port: ${{ secrets.PORT }} script: | bash ~/deploy.sh
deploy.sh
#! /bin/bash cd ~/myGo/src/x-api git pull go build -v pm2 start x
ERROR
======CMD====== 21 bash ~/deploy.sh 22
23 ======END====== 24 err: From github.com:lushann/ 25 err: dbecbb0..00deb08 master -> origin/master 26 out: Updating dbecbb0..00deb08 27 out: Fast-forward 28 out: .github/workflows/go.yml | 11 ++++++++++- 29 out: 1 file changed, 10 insertions(+), 1 deletion(-) 30 err: /**/deploy.sh: line 4: go: command not found 31 err: //deploy.sh: line 5: pm2: command not found 32 2019/12/*** 08:30:26 Process exited with status 127 33
when I exec deploy.sh with ssh on my terminal, it's all fine. But when I use ssh-action , error will happen. what should I do ?
sorry, can i ask you how to fix this error?
my actions
deploy.sh
ERROR
23 ======END====== 24 err: From github.com:lushann/ 25 err: dbecbb0..00deb08 master -> origin/master 26 out: Updating dbecbb0..00deb08 27 out: Fast-forward 28 out: .github/workflows/go.yml | 11 ++++++++++- 29 out: 1 file changed, 10 insertions(+), 1 deletion(-) 30 err: /**/deploy.sh: line 4: go: command not found 31 err: //deploy.sh: line 5: pm2: command not found 32 2019/12/*** 08:30:26 Process exited with status 127 33
[error]Docker run failed with exit code 1