Closed spences10 closed 6 years ago
Ok, so I thought I could pass the /public/
folder to now-pipeline
as I'm presuming that now-pipeline
is the same as now
from the terminal on my machine, so I was hoping that I could do that, here's my .travis.yml
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '9'
before_script:
- npm prune
script:
- npm run build
# - cd public
- npm i -g now-pipeline
- touch .npmignore
- DEBUG=now-pipeline now-pipeline /public/
# - now-pipeline --test "npm run deploy"
# - now-pipeline-list
# - npm i -g now-pipeline
# - now-pipeline-prune
# - now-pipeline 'npm run deploy'
# - now-pipeline --alias scottspence.now.sh
# after_success:
And I have the output for it here it seems to be deploying the whole project, well that's what I'm gleaning from now-pipeline deploying 480 files:
4.97s$ DEBUG=now-pipeline now-pipeline /public/
Mon, 08 Jan 2018 10:53:10 GMT now-pipeline deploying 480 files
Mon, 08 Jan 2018 10:53:10 GMT now-pipeline [ 'package.json',
....
Yea now-pipeline
is not the same as the cl tool.
@bahmutov Is this something you'd be interested in supporting? I believe I have a way to add this feature with very minimal changes. I have a pretty solid grasp on the flow of this but obviously you know more than I do. From the zeit docs this seems like it would be valid. So if you want I can put up another PR so you can my thoughts. If not just let me know.
Adding a folder option would be great!
Sent from my iPhone
On Jan 8, 2018, at 15:13, Joseph Snell notifications@github.com wrote:
Yea now-pipeline is not the same as the cl tool.
@bahmutov Is this something you'd be interested in supporting? I believe I have a way to add this feature with very minimal changes. I have a pretty solid grasp on the flow of this but obviously you know more than I do. From the zeit docs this seems like it would be valid. So if you want I can put up another PR so you can my thoughts. If not just let me know.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Added a new PR for your review and changes! Open to all thoughts.
Hi @wulfmann
I've tried this with now-pipeline --dir /public/
then I tried with - DEBUG=now-pipeline dir /public/
and got the following error in the output [here] if you're interested, here's a nice pic of it as well 😄
So from the error message and looking at the PR merged does the arg need to have the --
in it?
I'm now going to try - DEBUG=now-pipeline dir /public/
then if that fails I'll try specify the version of now-pipeline
to use in the .travis.yaml
here: https://travis-ci.org/spences10/blog.scottspence.me/builds/327671010
No none of the variations does anything when specifying a directory it always results in the previously pictured error message
I will take a look at this tonight. Is there any chance you could share your directory structure and package.json so I can recreate?
Hi @wulfmann, I changed over to the zeit example eventually, folder structure is here, and here is my package.json
The clean
and build
script are unchanged which is what was being used by now-pipeline
as it seems that it's only me that's having this issue I'm happy to close this.
Thanks
@spences10 Yes that would be great if you could close this one. I'm still looking into the other issue with the deploy, but since this is isolated and you feel good about it, go ahead and close.
Hi, I'm using the
- DEBUG=now-pipeline now-pipeline
script trying to get to grips with this toolFrom the output here:
I'm still not completely clear on what the command
now-pipeline
does, because the output appears to be reading from the root of the project and I want to only deploy thepublic
folder in my Gatsby project I'm cd'ing to that folder then running thenow-pipeline
command and getting errors because there's nopackage.json
🤷♂️There shouldn't be a
package.json
it's a static site, does that need to be configured as well?It's not the clearest on how to use, even with the
README.md