From the course: Learning Static Site Building with Hugo

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Deploy via FTP with Travis CI

Deploy via FTP with Travis CI

From the course: Learning Static Site Building with Hugo

Start my 1-month free trial

Deploy via FTP with Travis CI

- [Instructor] To fully automate the deployment, we need to run our deploy script from the travis.yml file. There's a few changes we need to make to .travis.yml. After the line in install where I run Hugo version, I also want to say NPM install. That will install the packages that NPM needs to run our deploy script. I'm also going to move the Hugo command up into before script and then change script to do NPM run deploy. That should be all that's necessary. Let's go ahead and check everything into Git do git add --all. If we tried to push these changes up now Travis would run the deploy script, but it would fail as soon as it couldn't find those environment variables with the server connection information. We need to add those to Travis, so that they're available for the script. Over in Travis, in the repo, we need to go the settings on the right hand side and scroll down to environment variables. Here's where we need to add all four of those environment variables here in Travis. So…

Contents