I want to deploy my Nuxt.js application on my remote server each time I commit into repository. Here is my deploy.yml:
name: 'Deployment'
on:
push:
branches: ['master']
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Connect to SSH
uses: appleboy/ssh-action@master
with:
host: webhostgb.com
username: root
key: ${{ secrets.PRIVATE_KEY }}
port: 22
script: |
cd whgb-new
git pull origin master
npm run build
fuser -kn tcp 3000
pm2 restart deploy.sh
Basically deploy.sh runs npm start, but I use pm2 to create another process instead of doing the deployment in GitHub actions process
And I after 10 minutes I get this error, even if it did well:
err: 4bc06ed9a5a0b2fa431a.js 4.77 KiB 14 [emitted] [immutable] pages/products/tags/_slug
err: 7bf498872cde31ceb6dd.js 13.3 KiB 7 [emitted] [immutable] pages/docs/_slug/index
err: 8992f5bd049ebae3c980.js 15.6 KiB 8 [emitted] [immutable] pages/docs/categories/_slug
err: 8e455a3b7f57d2d0fa08.js 4.53 KiB 13 [emitted] [immutable] pages/products/index
err: b3a251f0bfe837f702a7.js 1.17 KiB 3 [emitted] [immutable] pages/articles/_slug/index
err: b68201808fd6f4aec517.js 10.1 KiB 4 [emitted] [immutable] pages/articles/categories/_slug
err: d7cc3a28494e6a6dcc7a.js 15.3 KiB 9 [emitted] [immutable] pages/docs/index
err: e0d85ab9fd3f1ed51e0d.js 1.35 KiB 1 [emitted] [immutable] pages/_
err: server.js 205 KiB 0 [emitted] app
err: server.manifest.json 957 bytes [emitted]
err: Entrypoint app = server.js
err: 3000/tcp:
out: 31207
out: > [email protected] start /root/whgb-new
out: > nuxt start
out:
out: ℹ Listening on: http://localhost:3000/
2020/05/31 01:39:05 Error: command timeout
err: Run Command Timeout!
Also, the default timeout configuration of 360 minutes should apply if not explicitly stated in the settings within each workflow.
Billable job execution minutes are only shown for jobs run on private repositories that use GitHub-hosted runners and are rounded up to the next minute. There are no billable minutes when using GitHub Actions in public repositories or for jobs run on self-hosted runners.
Our best theory in the case of GitHub Actions is that the slow hardware seems to be self-inflicted due to the close marriage to the Microsoft Azure cloud. Painting with a larger brush, we also think the odd choice of hardware is a widespread problem in the entire CI ecosystem and not limited to GitHub Actions.
I get the same error. I fix it with variable command_timeout
.
For example :
...
port: 22
command_timeout: 200m
...
Maybe it can help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With