Skip to content

I'm getting an error when running your action #2

Description

@maxacarvalho

Hi,

I'm trying to use your action to deploy my project using Laravel Deployer but I'm getting an error and I'd like some help if you don't mind.

Here's the error that I see on Github Actions output:

Run atymic/deployer-php-action@0.1.0
  with:
    ssh-private-key: ***
    ssh-known-hosts: ***
    ssh-disable-host-key-checking: true
- Install Deployer [1/2]
- Install Deployer [1/2]
- Setup SSH [2/2]
- Install Deployer [1/2]
- Command failed with exit code 1: ssh-add - [2/2]
- Install Deployer [1/2]
- Command failed with exit code 1: ssh-add - [2/2]

➤ Executing task deploy:unlock

In Client.php line 103:
                                                                               
  [Deployer\Exception\RuntimeException (-1)]                                   
  The command "rm -f ***/.dep/deploy.lock" faile  
  d.                                                                           
                                                                               
  Exit Code: -1 (Unknown error)                                                
                                                                               
  Host Name: ***                                                      
                                                                               
  ================                                                             
  Host key verification failed.                                                

You can see that it fails when trying to verify the host key but I think it has to do to the fact that on the previous step it fails the command ssh-add.

Here's my action YAML file:

name: deploy
on:
  push:
    branches:
      - master

jobs:
  deploy:
    name: deploy to production
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/master'
    steps:
      - uses: actions/checkout@v1
      - name: Setup PHP
        uses: shivammathur/setup-php@master
        with:
          php-version: 7.4
          extensions: mbstring, bcmath
      - name: Composer install
        run: composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader --no-suggest
      - name: Setup Deployer
        uses: atymic/deployer-php-action@0.1.0
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
          ssh-known-hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
      - name: Run Deployment
        env:
          APP_HOST: ${{ secrets.APP_HOST }}
          APP_DEPLOY_PATH: ${{ secrets.APP_DEPLOY_PATH }}
          APP_DEPLOY_USER: ${{ secrets.APP_DEPLOY_USER }}
          APP_DEPLOY_DEFAULT: ${{ secrets.APP_DEPLOY_DEFAULT }}
        run: php artisan deploy production --verbose

I appreciate any help that you might be able to provide.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions