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
From the course: Learning Static Site Building with Hugo
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Deploy via FTP overview2m 2s
-
(Locked)
Set up Node and npm1m 40s
-
(Locked)
Connect to the server7m 21s
-
(Locked)
Collect the local files4m 51s
-
(Locked)
Remove old files from the server5m 39s
-
(Locked)
Upload the site content2m 43s
-
(Locked)
Deploy via FTP with Travis CI1m 57s
-
(Locked)
FTP next steps1m 2s
-
-
-
-