Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

build: automatic publish

  • Loading branch information...
commit a8038fdbbdbb3be3647aa49918f98ce3465b3e1f 1 parent b57611a
marius a. eriksen mariusaeriksen authored

Showing 3 changed files with 19 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 Makefile
  2. +4 0 README.md
  3. +12 0 publish.sh
4 Makefile
@@ -4,5 +4,7 @@ all:
4 4 serve:
5 5 jekyll --serve --auto web web.out
6 6
  7 +publish: all
  8 + ./publish.sh web.out
7 9
8   -.PHONY: all serve
  10 +.PHONY: all serve publish
4 README.md
Source Rendered
@@ -5,3 +5,7 @@ We use [jekyll](https://github.com/mojombo/jekyll) to generate the site. In orde
5 5 $ gem install jekyll
6 6
7 7 should do. Now, build the site with `make`. This will create a copy of the lessons in the `web.out` folder. For development, `make serve` will launch `jekyll` in serving mode: a web server will be launched on port 4000, and changing files will automatically rebuild the site.
  8 +
  9 +To publish to http://twitter.github.com/scala_school:
  10 +
  11 + $ make publish
12 publish.sh
... ... @@ -0,0 +1,12 @@
  1 +#!/bin/bash
  2 +
  3 +dir=$1
  4 +out=/tmp/school.$$
  5 +
  6 +trap "rm -fr $out" 0 1 2
  7 +git clone -b gh-pages git@github.com:twitter/scala_school.git $out
  8 +cp -r $dir/* $out/
  9 +cd $out
  10 +git add .
  11 +git commit -am"publish by $USER"
  12 +git push origin gh-pages

0 comments on commit a8038fd

Please sign in to comment.
Something went wrong with that request. Please try again.