deployphp / action

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

curl -LO undefined #63

Closed michielgerritsen closed 4 months ago

michielgerritsen commented 1 year ago

Hey,

When running this I'm getting this error:

Downloading "undefined".
$ curl -LO undefined
curl: Remote file name has no length!
curl: (23) Failed writing received data to disk/application
Error: curl: Remote file name has no length!

The curl command that triggers this error can be found here: https://github.com/deployphp/action/blob/master/index.js#L101

I tried to trace down the issue, and I'm guessing it's caused by the fact that the project is using Deployer version 7.3.1, but this is not (yet) in the manifest.json.

There is a check in place if the url == null but it seems that the value is actually undefined.

Upvote & Fund

Fund with Polar

piotrkwiecinski commented 1 year ago

Until it's fixed you can use these steps to use the latest version of Deployer:

- name: Download `deployer.phar`
  run: composer global require deployer/deployer:${{vars.DEPLOYER_VERSION}} --no-interaction --verbose --ansi
- name: Get composer global bin-dir path
  id: composer-bin-dir
  run: echo "path=$(composer global config bin-dir --absolute)" >> $GITHUB_OUTPUT
- name: Deploy
  uses: deployphp/action@v1
  with:
    deployer-binary: ${{ steps.composer-bin-dir.outputs.path }}/dep        

It's what I have in my pipeline.

michielgerritsen commented 1 year ago

Maybe I should have added this: To fix it for now I run a composer install in the project, so the deployer binary from the vendor folder is used :-)

hashimaziz1 commented 9 months ago

This doesn't seem to have been fixed yet in 7.3.1. Any idea when it will be without requiring the extra step above? For what it's worth, my workflow has the following to install composer dependencies but it doesn't seem to make a difference:

  - name: Run Composer install for production
    run: composer install -o -q --no-dev --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist