Timeout error after 10 minutes when deploying from github repo to aws ec2 using github action workflow

Viewed 445

I am trying to do auto deploy react app from Github repo to aws ec2 using github action workflow.

I chose Node.js in action and wrote yml as following

name: Node.js CI

on:
  push:
    branches: [ staging ]
  pull_request:
    branches: [ staging ]

jobs:
  build:

    runs-on: ubuntu-latest
    timeout-minutes: 30

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Deployment
        timeout: 40
        uses: appleboy/ssh-action@master
        with:
          node-version: 10.x
          cache: 'npm'
          host: ${{ secrets.SECRET_LINK }}
          key: ${{ secrets.SECRET_KEY }}
          username: ${{ secrets.SECRET_NAME }}
          script: |
            cd /var/www/html/
            git checkout staging
            git pull
            npm install
            npm run build

When deploying, I face this error after 10 minutes from the start. err: Run Command Timeout!

enter image description here

I set timeout-minutes as 30 minutes but it always failed.

0 Answers
Related