1

I use github action to deploy my website to my server. The last ssh cmd is npm run start. It will output ready - started server on http://localhost:4000(Since i use Nextjs) finally but it seems that github doesn't know what did it mean and print :

2021/01/09 14:24:14 Error: command timeout
err: Run Command Timeout!

Although the website is successfully deployed, it shows that the Github action failed to execute. So how to tell github action that the job had done successfully?

RiverTwilight
  • 638
  • 4
  • 8

1 Answers1

0

You should find a way to start the application in a daemon process of its own, rather than as a process within the SSH session. Perhaps this tool (pm2) might solve your problem? This question and answer is somewhat related.

There are definitely other ways to start your app in a daemon process, or perhaps as a service, but this might be the most straightforward for you since it's a Node tool.

jidicula
  • 3,454
  • 1
  • 17
  • 38