jsmrcaga / action-netlify-deploy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug]: Unexpected argument: deploy

imnotteixeira opened this issue · comments

Hey, before anything, congratulations on this package, it is really helpful!

My use case is deploying a folder to netlify. Before, I was using v1.1.0 and NETLIFY_DEPLOY_TO_PROD = true, but now I want to have deploy previews, which I assume would be done with NETLIFY_DEPLOY_TO_PROD=false. So I upgraded to v1.3.0 and added some params such as the deploy_alias, but I am getting an error like shown in the picture below.

image

This is my workflow, for reference. The step before deploying is building the resources, hence no build command needed.

name: Create Slate API Documentation (DEV)

on:
  pull_request:
    branches: 
      - develop
    paths:
      - "documentation/*"

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    
    - name: Build documentation
      uses: docker://decathlon/slate-builder-action:latest
      env:
        GITHUB_TOKEN: ${{ secrets.SLATE_TOKEN }}
        DOC_BASE_FOLDER: ./documentation
        ZIP_BUILD: false

    - name: Deploy Documentation
      uses: jsmrcaga/action-netlify-deploy@v1.3.0
      with:
        NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
        NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_DEV }}
        NETLIFY_DEPLOY_TO_PROD: false
        NETLIFY_DEPLOY_MESSAGE: ${{ github.sha }}
        deploy_alias: ${{ github.sha }}
        install_command: echo "No-op install"
        build_command: echo "No-op build"
        build_directory: documentation/build

Might this be some bug introduced in the latest version? I'd appreciate some help, thanks in advance!

Hi @imnotteixeira ! Thanks for opening the issue!

I can look into this this evenig (CEST time, so in about 10/11 hours), I hope we're not slowing your development too much. In the meantime try going back one version.

I'm taggin @tpluscode to see if you have more time (or sooner) to look into this.
I'm suspecting I reviewed your PR too quickly and this line should be $DEPLOY_ALIAS instead of $COMMAND ?

Yes, it definitely is the problem. Such a stupid mistake, sorry.

Hey, that didn't break my workflow, it's still in implementation phase :P

Anyway, I think I'll manage to use netlify's auto deploys configuration, so I won't need to use this action, nevertheless, I think I've done my part in finding the bug ahaah

I can confirm that 1.1.0 worked (not with those features, of course, since they were introduced later)

@tpluscode no worries! My bad, i reviewed too hastly!

Thanks for the bug discovery @imnotteixeira