TheyWorkForYou is an approach to creating Parliamentary Monitoring sites.
This involves combining data from EveryPolitician with other site-specific sources, and automatically rebuilding a static site (stored in the gh-pages
branch of the site’s repo, for deployment to Github Pages) when any of the underlying information changes. Almost all functionality is provided through Jekyll plugins, using Travis to rebuild the site on request.
First you'll need to create a Jekyll repository for the new site.
$ jekyll new my_pmo_site
$ cd my_pmo_site
- Follow GitHub's instructions for creating a
gh-pages
branch. - Enable Travis CI builds on the repository with
travis enable
. - Copy the
.travis.yml
and_bin/deploy
scripts from another site built using this approach, e.g. shineyoureye. - Create a GitHub Personal Access Token and then encrypt it with
travis encrypt GITHUB_ACCESS_TOKEN=yourtokenhere
, then replace thesecure:
line in.travis.yml
with the output from that command. - Make sure the access token has read access to public repos.
- Make sure the person/robot who you created the access token for has push permission to the repository.
- Push the change to GitHub
- Done! Now every push to the
master
branch should get built on Travis and deployed to GitHub Pages.