actions icon indicating copy to clipboard operation
actions copied to clipboard

Unexpected input args

Open Sceat opened this issue 5 years ago • 10 comments
trafficstars

When using the cli i get an error

##[warning]Unexpected input 'args', valid inputs are ['']
Run netlify/actions/cli@master
  with:
    args: deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --message "Publishing app" --prod
  env:
    NETLIFY_SITE_ID: ***
    NETLIFY_AUTH_TOKEN: ***

Sceat avatar May 19 '20 14:05 Sceat

I have the same issue, my workflow is working fine, I have no idea how to fix this warning.

lewis-geek avatar May 24 '20 14:05 lewis-geek

@lewis-geek in the mean time i just use the base cli

- name: publish to netlify
  run: npx netlify-cli deploy --dir dist --site ${{ env.NETLIFY_SITE_ID }} --auth ${{ env.NETLIFY_AUTH_TOKEN }} --message "Publishing app" --prod
  env:
    NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
    NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

Sceat avatar May 24 '20 15:05 Sceat

If you set NETLIFY_SITE_ID and NETLIFY_AUTH_TOKEN in ENV there's no need to pass them as flag arguments. Are you passing them for any particular reason? Would like to know if it warns without --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN part

kitop avatar Jun 06 '20 11:06 kitop

Hi @kitop, I set deploy --dir=public --prod in args, but it also causes the same error.

lewis-geek avatar Jun 06 '20 14:06 lewis-geek

@lewis-geek Did you try checking the indentations accordingly ?

 - name: Deploy to netlify
        uses: netlify/actions/cli@master
        with:
          args: deploy --dir=public --prod --functions=functions
        env:
          NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
          NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}

praisegeek avatar Jun 06 '20 15:06 praisegeek

Mhm... I think it's related to https://github.com/actions/runner/issues/499 - did you start seeing this just ~18 days ago?

kitop avatar Jun 06 '20 17:06 kitop

Hi @Sceat it works fine now on my side, no error anymore, it seems like someone fixed this issue, maybe you can close this issue.

lewis-geek avatar Jun 09 '20 16:06 lewis-geek

Indeed seems to work! actually there may a loosely related problem

with:
    args: deploy --dir=dist --alias=edge --message='Publishing edge'

alias is not an expected arguments even through https://github.com/netlify/cli/pull/943 has been merged for https://github.com/netlify/cli/issues/275

--message='Publishing edge' only works with singles quotes, i wonder how we could pass variables if double quotes throw an unexpected argument

Sceat avatar Jun 09 '20 18:06 Sceat

Ok, seems alias has not been deployed to npm yet

Sceat avatar Jun 12 '20 15:06 Sceat

You could try actions-netlify which uses the JS client

rajington avatar Jun 12 '20 23:06 rajington