Skip to content
This repository was archived by the owner on Jun 15, 2024. It is now read-only.

Development

Eugene Cheung edited this page Sep 25, 2015 · 10 revisions

View the draft site

cssu.ca uses Travis CI to continuously deploy the draft branch to Heroku.

Visit http://draft.cssu.ca/ to view the current state of the site on the draft branch.

Viewing the site locally

You should have Ruby 2.2.1 and Python 2.7.x (for Pygments) installed. I recommend using rbenv and pyenv to manage your Ruby & Python installations.

First, you'll need bundler:

gem install bundler

Bundle the required gems:

bundle install

Then clone this repository and serve the site locally:

git clone git@github.com:cssu/cssu.ca.git
cd cssu.ca/
jekyll serve

You can use the watch flag when developing to instantly see the changes that you've made.

jekyll serve --watch

NOTE: Changes to config.yml will not be instantly applied; you'll need to restart the server.

Branching

Use the draft branch to make any updates to the website. Whenever you want to publish your changes to the website, merge draft into master and then deploy:

# After making updates, merge `draft` into `master`
git checkout master
git merge draft

# Deploy to CDF (see 'Deploying' below for steps to set up the cdf remote)
git push cdf master

IMPORTANT: It's okay for commits on draft to contain bugs/issues, but master should always point to a commit that is ready to be published.

Pulling upstream changes

Whenever you need to pull upstream changes into your local branch, or update your feature branch with the latest draft changes, please rebase instead of merge. This will apply your changes on top of the upstream branch, avoiding messy merge commits.

Pulling draft changes from upstream:

git checkout draft
git pull --rebase

Updating your feature branch with draft changes:

git checkout feature/cssu-now-selling-beer
git pull --rebase origin draft

# If you've already pushed commits to origin, 
# you must force push your feature branch after rebasing:
git push --force

If someone else is working on the same feature branch as you, they would then have to overwrite their local branch with the rebased one you just pushed:

git checkout feature/cssu-now-selling-beer
git fetch
git reset --hard origin/feature/cssu-now-selling-beer
Clone this wiki locally