Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Unexpected argument: deploy #12

Closed
imnotteixeira opened this issue Jan 30, 2021 · 4 comments · Fixed by #13
Closed

[bug]: Unexpected argument: deploy #12

imnotteixeira opened this issue Jan 30, 2021 · 4 comments · Fixed by #13

Comments

@imnotteixeira
Copy link

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!

@jsmrcaga
Copy link
Owner

jsmrcaga commented Feb 1, 2021

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 ?

@tpluscode
Copy link
Collaborator

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

@imnotteixeira
Copy link
Author

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)

@jsmrcaga
Copy link
Owner

jsmrcaga commented Feb 2, 2021

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

Thanks for the bug discovery @imnotteixeira

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants