I have GitHub action to deploy the app to the server. I'm deploying the app and running a few commands to restart the app using ssh. Then, I'm starting the process using pm2. The problem is, It streams the log to the console stdout, and the Github action hags up with a timeout error. What I want to do is spawn the application instance without streaming the log to the console. Here is the command I'm using to start the app.
NODE_ENV=production && pm2 start ecosystem.config.json
and, here is the ecosystem configuration file.
{
"apps": [
{
"name": "apitoid",
"script": "src/index.js",
"instances": 1,
"autorestart": true,
"watch": false,
"time": true,
"env": {
"NODE_ENV": "production"
}
}
]
}
Is there any way I can prevent logging stream to stdout or no stdout in GitHub action workflow?