Deployment Process
This document describes the process to deploy verse onto a CDN server. All release builds of verse should be hosted on a CDN server (such as Amazon CloudFront); while the dev build of verse should be available in an S3 bucket. Application developers wanting to use 'verse', should simply have to include a link in their HTML markup to verse.css and verse.gss either from CDN or S3 depending on whether they want to use release or dev build. The dev build available in an S3 bucket should be accessible via URLs which point to the static verse.css and verse.gss files, as show here (<url>
should be replaced with the URL pointing to the CDN server):
<link rel="stylesheet" type="text/css" href="<url>/css/verse.css">
<link rel="stylesheet" type="text/gss" href="<url>/gss/verse.gss">
<script type="text/javascript">
GSS_CONFIG = {useWorker: false,debug: false};
</script>
<script type="text/javascript" src="http://gridstylesheets.org/bower_components/gss/dist/gss.js"></script>
-
Clone the repo
git clone https://github.com/pandastrike/verse.git
-
Make sure you're in the right directory:
cd verse
-
Install all the dependencies:
npm install
-
Create the build directory
mkdir build
-
Build (this script will compile the website and also all the files required for export)
bin/build
-
Copy contents of
build/export
directory to target location (either CDN server or S3 bucket)
-
Dev Build - Every code push to master should trigger deployment of development build to S3.
-
Release Build - 'release' branch contains the code that's deployed. Every time a release is required, dev team @ verse should do the following:
-
Merge master's HEAD into 'release' branch.
git checkout release git merge master git push
-
Create a tag on release branch with a name following SemVer naming convention
<major>.<minor>.<patch>
(e.g. 0.4.1).git checkout release git tag <version> (where <version> SemVer number of the release e.g.: 0.4.1) git push origin tag <version>
This should automatically trigger deployment of release (named after the same version as in the tag) to CDN.
-