netlify / actions

MIT License
375 stars 59 forks source link

Unexpected input args #32

Open Sceat opened 4 years ago

Sceat commented 4 years ago

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: ***
lewis-geek commented 4 years ago

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

Sceat commented 4 years ago

@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 }}
kitop commented 4 years ago

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

lewis-geek commented 4 years ago

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

praisegeek commented 4 years ago

@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 }}
kitop commented 4 years ago

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

lewis-geek commented 4 years ago

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.

Sceat commented 4 years ago

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 commented 4 years ago

Ok, seems alias has not been deployed to npm yet

rajington commented 4 years ago

You could try actions-netlify which uses the JS client