Closed github-learning-lab[bot] closed 3 years ago
Build your site.
REPLACE-ME-WITH-BUILD-SCRIPT
placeholder in your .travis.yml
file bundle exec jekyll build
You can do this by editing the file from the Files changed tab, or by scrolling down and accepting the suggested change.
Now that you've added some validation tests to your CI build, it's time to turn on some branch protections. Protected branches ensure that collaborators cannot make irrevocable changes to specific branches. This also allows you to enable CI required status checks to pass before merging.
I've changed the protections for the main
branch throughout the course so far to help keep you on track. Now, it's time for you to make some changes.
main
branchmain
.Awesome, nice work getting those branch protections in place :tada:
But, right before you enabled your branch protections, something happened. A contributor committed invalid syntax on main
and broke your CI build. Luckily, your new test caught it and you turned on branch protections. These types of errors won't make it into future builds.
Note: If your build is still processing, you may not see the failed test yet. If you wait a few minutes, it should be done soon.
Looking at your build status, click on the Details link as shown below in one of your builds:
Navigate to the Build Failed section and click on the build failed link:
Notice that you get the following error:
Liquid Exception: Liquid syntax error (line 1): Unknown tag 'site' in docs/01_getting_ready_for_class.md
Jekyll uses Liquid, an open-source templating language. Liquid loads data dynamically and implements conditional logic. Some of the Liquid syntax in one of the files is incorrect.
Let's find the broken syntax and fix the build!
Nice job finding and fixing that Liquid syntax!
It might take a moment, but notice as your build is complete that all checks have passed.
Now that your pull request has a successful build, let's merge it!
In this pull request, I've added some tests to help ensure the project builds. This is just one example of how you can customize specific validations that will be ran when your CI starts a build. I need you to add a script to build our project in the
.travis.yml
file.