bahmutov / now-pipeline

Simple CI pipeline with goal to deploy new version at Zeit Now cloud if tests pass
141 stars 8 forks source link

now-pipeline doesn't deploy to now #31

Closed spences10 closed 5 years ago

spences10 commented 6 years ago

Tried just over 70 builds now with this, not one has resulted in something being pushed to now

If you take a look at the latest build here you can see that it was successful but doing a now ls doesn't show anything as being deployed.

I have tried using a new token, tried with and without cache, tried installing specific versions and nothing seems to be working.

Here is the .travis.yaml I'm using:

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@1.10.0
  - now-pipeline

  # - now-pipeline-list
  # - now-pipeline --alias scottspence.now.sh

after_success:
  # - ls -la

I'm changing dir to public as using the --dir arg doesn't seem to work either.

Let me know if there's anything else you need from me, I'm going to try this with another project just to make sure it's nothing specifically relating to Gatsby

Thanks

wulfmann commented 6 years ago

The error being thrown in your build log is that package.json can not be found. This is required to publish to now, and I why it’s not working.

I am looking at the issue with —dir, but at least this is why your build here is not working.

spences10 commented 6 years ago

Gatsby is a static site generator, the public folder which it builds to doesn't have a package.json

wulfmann commented 6 years ago

@spences10 Just to give you an update, currently now-pipeline does not directly mirror now-cli's behavior in regards to deploying directories. now-pipeline does an explicit check for package.json in the files that are passed to be deployed. This isn't required by now, and i'm looking through it to see how much would actually be required to change this, and what parts need to stay. So i'll let you know what I find out.

spences10 commented 6 years ago

It's ok, I moved to a different process now, I encrypted a token with Travis and used the zeit example

But it makes sense now as to why it was failing if there's a need for a pkg.json 🤷‍♂️

I'll be trying to do an actual app [with a pgk.json] next so will try it for that 👍

spences10 commented 5 years ago

Stale, closing