-
Notifications
You must be signed in to change notification settings - Fork 0
07. Working with the web site
The project web site is built with Jekyll, a static web site generator. The source code is in the gh-pages branch.
- Install Ruby Linux instructions Windows instructions
- Install Jekyll, see instructions
- Install additional gems
gem install jekyll-sitemapgem install s3_websitegem install html-proofer - Clone the repository and switch to
gh-pagesbranch - Init and update the submodule, see commands in update-ghpages.sh
- In the repository's main directory run
jekyll build - Test the site locally by running
jekyll serve
We use a quite complex automagic build chain in order to guarantee that any change in either the master or the gh-pages branch gets deployed ASAP.
This buildchain does take a long time though! Especially the travis build of master can take up to 20 minutes!
The build chain looks something like this (each point triggers the one below itself):
- commit in master
- travis build of master
- update-ghpages.sh (via
after_success: bash update-ghpages.shin .travis.yml of master) - Travis-CI automagic update and commit of the git submodule to gh-pages branch
- travis build of gh-pages branch
- s3 deploy (via
after_success: ...in .travis.yml of gh-pages)
Due to the fact that we use git submodules, the website normally wouldn't automatically update with the changes in the master branch.
To enable the automatic update of the submodule reference we use the update-ghpages.sh script in the master branch together with Travis-CI.
Travis calls the update-ghpages.sh script if the build was successfull (as seen in travis.yml Line 17)
We additionally deploy our website to an Amazon s3 instance with cloudfront CDN.
This is again accomplished through the use of Travis. First of all we have our own buildscript to build and test our website. If this build and the test is successfull then we use the s3_website application to publish the website. This is done via after_success: ... in .travis.yml of gh-pages
The web site patterns page displays a collection of categories and tags that can be used to select patterns based on criteria. The available categories and tags can be edited in gh-pages branch _data folder https://github.com/iluwatar/java-design-patterns/tree/gh-pages/_data