deployphp / action

GitHub Action for Deployer
MIT License
222 stars 44 forks source link

Command "deploy" is not defined. #84

Closed tobz-nz closed 3 weeks ago

tobz-nz commented 3 weeks ago

I'm getting this error

Run deployphp/action@v1

$ ssh-agent -a /tmp/ssh-auth.sock
SSH_AUTH_SOCK=/tmp/ssh-auth.sock; export SSH_AUTH_SOCK;
SSH_AGENT_PID=2514; export SSH_AGENT_PID;
echo Agent pid 2514;
$ ssh-add -
Identity added: (stdin) (action@deployer.org)
Using "vendor/bin/dep".
$ php vendor/bin/dep deploy main -o keep_releases=3  --no-interaction --ansi -v 
In Application.php line 720:

  [Symfony\Component\Console\Exception\CommandNotFoundException]  
  Command "deploy" is not defined.                                

Exception trace:
  at phar:///home/runner/work/project/project/vendor/deployer/deployer/dep/vendor/symfony/console/Application.php:720
 Symfony\Component\Console\Application->find() at phar:///home/runner/work/project/project/vendor/deployer/deployer/dep/vendor/symfony/console/Application.php:259
 Symfony\Component\Console\Application->doRun() at phar:///home/runner/work/project/project/vendor/deployer/deployer/dep/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///home/runner/work/project/project/vendor/deployer/deployer/dep/src/Deployer.php:317
 Deployer\Deployer::run() at phar:///home/runner/work/project/project/vendor/deployer/deployer/dep/bin/dep:96
 require() at /home/runner/work/project/project/vendor/deployer/deployer/dep:4
 include() at /home/runner/work/project/project/vendor/bin/dep:119
Error: Failed: dep deploy,main,-o,keep_releases=3

This is my deploy workflow step. Everything works up until here.

  deploy:
    needs: [tests]
    concurrency: production_environment
    runs-on: ubuntu-latest

    if: github.event_name == 'push' && (endsWith(github.ref, '/main') || endsWith(github.ref, '/staging'))

    steps:
      - uses: actions/checkout@v3

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: "8.3"

      - name: Add Composer HTTP basic auth credentials
        run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json

      - name: Install dependencies
        run: composer install

      - name: Deploy
        uses: deployphp/action@v1
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          dep: deploy ${{ github.head_ref || github.ref_name }} -o keep_releases=3

Upvote & Fund

Fund with Polar

tobz-nz commented 3 weeks ago

never mind - I hadn't committed the deploy.yml file 🤦‍♂️