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

Add extra input option to determine production deploy #188

Merged
merged 1 commit into from
Jun 13, 2020

Conversation

gvdp
Copy link
Contributor

@gvdp gvdp commented Jun 13, 2020

I was running into a problem while trying to deploy my site to 'production' when the action was triggered by pushing a new tag. I noticed Issue #102 already existed which deals with the same problem, so I took a stab at implementing it. If I followed the discussion correctly the consensus was to name the input property production-deploy, if not that's an easy rename.

I also added a unit test (only for this draft boolean though, not every option) but I'm not a natural at Jest so that might require some tweaking.

I'm already using this branch in my private repo so it does work :-)

@nwtgck
Copy link
Owner

nwtgck commented Jun 13, 2020

@gvdp Fantastic work!

The implementation is exactly or beyond what I want to implement. Actually, I thought I will need mock to implement this feature, but you have implemented!!

@nwtgck
Copy link
Owner

nwtgck commented Jun 13, 2020

I also added a unit test (only for this draft boolean though, not every option)

I think it's good. Currently, we have following options on deploy() function. Only draft is logically decided. The others are very simply decided. Their values provided with with: or undefined if not specified.

  {
      draft: !productionDeploy,
      message: deployMessage,
      configPath: netlifyConfigPath,
      branch: alias
  }

@nwtgck
Copy link
Owner

nwtgck commented Jun 13, 2020

(Security note: I built dist/index.js with npm run all locally, but I had no diff.)

I made a minor change. I'll merge this!

@nwtgck nwtgck merged commit b013279 into nwtgck:develop Jun 13, 2020
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 this pull request may close these issues.

2 participants