ssh-action icon indicating copy to clipboard operation
ssh-action copied to clipboard

File and command not found error

Open shurale85 opened this issue 1 year ago • 0 comments

Hi! I run script on real device to build my iOS project. But it is failed with file not found and command not found errors. However, it is fine to connect to build machine remotely via ssh and run that script. I can't understand what I miss

- name: executing remote ssh commands using password
        uses: appleboy/[email protected]
        with:
          host: ${{ secrets.MACIP }}
          username: ${{ secrets.BUILDLOGIN }}
          password: ${{ secrets.BUILDPASSWORD }}
          script: cd /Users/someuser/project/ && git pull | sh /Users/someuser/project/build.sh | echo $PWD
          debug: true

image

One more thing I can't get how change working directory correctly. If I use scrpit: cd somepath | git pull then I get error not repository. But if I use cd somepath && git pull - it is ok. What is the difference?

shurale85 avatar Dec 02 '23 08:12 shurale85