[Vuejs]-Deploying a vue project to surge.sh

0👍

The reason your dist folder is missing after the Travis build step is because the environment is cleaned up after each step.

In order to prevent this, you need to specify a deploy: section in your .travis.yml and set the skip_cleanup: true setting.

Luckily for you, Travis CI supports Surge.sh deployment directly, so you don’t need to use the surge CLI tool directly in an after_success step. Have a look at the linked instructions above and see how you go.

Update:

I think you need to add a script: step to build your site before you deploy it. Otherwise I don’t think this command is being called by anything else.

Something like:

install:
  - npm install
script:
  - npm run build
deploy:
  provider: etc...

Leave a comment