Travis-CI
Travis CI for continuous integration
A common term in software development is CICD or continuous integration, continuous delivery or deployment. Travis CI is a tool that makes automated testing and deployment easy. It provides free continuous integration to open source projects hosted on GitHub and BitBucket. I’m going to use it to build and deploy this website as I update the GitHub for bogdanworks.com.
Set Up Account on Travis-CI with GitHub account
In order to configure a project using Travis CI you need a GitHub account and to sync your GitHub project with Travis CI. You can actually use your GitHub account to sign up for Travis CI by clicking the login with GitHub button at the top of the Travis-CI sign up page:

Travis-CI sign-up page
Add New GitHub repository to Travis-CI
Clicking the + icon you can add a new repository:

Travis-CI Add new repository from GitHub
Sync Travis-CI with GitHub
If you can not see your GitHub repositories click the “Sync account” button. When your appropriate GitHub repository shows, click the “Settings” button next to that repository.

Travis-CI syncing GitHub account and opening settings
Build Only Master Branch with Travis-CI
Turn off the build pushed pull requests” as we will only be pushing the master branch:

Travis-CI repository build settings
Configuring Travis-CI
Once Travis CI is synched with your GitHub account, a yml file needs to be at the root of the project titled .travis.yml with the contents similar to what is listed below:
Note: make sure you have the current version of Hugo from https://github.com/gohugoio/hugo/releases
|
|
Push Project Updates to GitHub
You’ll need to add and commit any updates to your repository and push them up to your GitHub repository.
git add . git commit -m “First TravisCI build” git push origin
For help with git commands see my GitCheatsheet post.
After your GitHub push, Travis CI will build your project. You can also sync up your deployment with Travis CI so your updates will go to your website. I used Netlify but there are also other options like, FTP and AWS deployment.