Branch | Live Site | Test Status | CICD Status |
---|---|---|---|
main |
Production Site | ||
development |
Development Site |
Welcome to the Enigma Glass training resource. This site has been designed to provide a framework that Enigma Glass or other students can continue to build on.
The major factor that informed our design decisions was ease of development and integration. This project has been setup in a way that attempts to make it as easy as possible to contribute to. The site content development work is done mostly in markdown, but the site can be customized with HTML, CSS, and JS. Due to the include / override nature of Ruby on Rails and Gems, the site will run well and look good without anything other than markdown.
This project deploys to three distinct environments and features automated build and deploy workflows, in addition to automated testing and dependency scanning.
The site is intended to be served by Jekyll; it was built using a gem theme called just-the-docs
. When the site is built Jekyll parses all of the markdown files in the directory looking for templating tags and markdown. It then outputs the _site
directory which contains the static HTML / CSS / JS for the site.
When the site is built a search index is created to be used by Lunr.js to support the site's full-text search functionality. The search runs as clientside javascript, but as this is a small static site the search is still lightning fast.
- Create feature branch off of develop
git checkout -b feature/my-cool-feature develop
- Make you changes and test them locally.
# run site locally (you must have Ruby and Jekyll installed)
`bundle install`
`bundle exec jekyll serve --livereload`
- Create a pull request to merge your branch with
develop
.
This pr will trigger the Pheonix deploy which creates a shortlived repository that is owned by the enigmaglass-docs organization before deploying a build of your branch to that repo. Your version of the site will then be served at it's own external URL.
This stage is usefull for getting an idea of what your changes will look like if you can't run the site locally, or if you want to verify that the site behaves as it should when deployed on github pages. These workflow runs are aggregated in the pr-staging environment.
The Pheonix deploy is entireley optional.
- Once you've tested what you want to in the Pheonix stage and your pull request has at least 1 approval you can complete the pr into
develop
.
A push to develop
will trigger the Development Build and Deploy workflow which will build the site and deploy it to the enigmaglass-dev repository. The dev site can be accessed here.
- To complete the contribution and update the production site, create a pull request merging
develop
intomaster
. In order to merge intomaster
you will need 1 pr approval, the development environment must be successfuly deployed to. The Development build pipeline can be run manually from any branch to deploy that version of the site to the development environment.
Your push into master
will trigger the Github pages build and deploy workflow that deploys to the github pages environment.