GithubHelp home page GithubHelp logo

Comments (5)

asymness avatar asymness commented on May 21, 2024 19

Fixed by redirecting all output:
nohup python script.py > nohup.out 2> nohup.err < /dev/null &

from ssh-action.

kadukm avatar kadukm commented on May 21, 2024 1

@asymness thank you! I faced the same problem. Do you know why it works like this? I tried to find an answer to this question for several hours but found nothing.

from ssh-action.

mogendi avatar mogendi commented on May 21, 2024 1

@Saljooq moving nohup to a command directly under the list of commands on the action worked for me for some reason.

some something like:
.github/deploy.yaml

uses: appleboy/ssh-action@master
        with:
          key: ${{ secrets.KEY  }}
          host: ${{ secrets.HOSTNAME  }}
          username: ${{ secrets.USERNAME  }}
          script: |
            ./some_script

./some_script

nohup ./some_other_script > nohup.out 2> nohup.err < /dev/null &

I changed it to:
.github/deploy.yaml

uses: appleboy/ssh-action@master
        with:
          key: ${{ secrets.KEY  }}
          host: ${{ secrets.HOSTNAME  }}
          username: ${{ secrets.USERNAME  }}
          script: |
            nohup ./some_script > nohup.out 2> nohup.err < /dev/null &

from ssh-action.

asymness avatar asymness commented on May 21, 2024

For some reason, the action keeps waiting for stdin, stdout, and stderr. That's why we need to redirect all three outputs to free the terminal. That's all I could gather from this...

from ssh-action.

Saljooq avatar Saljooq commented on May 21, 2024

So I've had a very similar issue with docker compose. As per the suggestion I tried redirecting all three fds (input, output and error), but no luck, my github actions keep running and then timing out and failing.

Here's the script:

nohup sudo docker compose --env-file ./.config/.env up > nohup.out 2> nohup.err < /dev/null &

Any help would be appreciated :)

from ssh-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.