codefordenver / code-for-denver-site

This is the old version of our website (but still used for a few things).
11 stars 11 forks source link

Stories in Ready Build Status

Code for Denver Website

Developing

Dependencies

You will need:

To install local dependencies, run:

npm install

Running

To start the local app server for development, run:

npm start

Deploying

Travis CI is configured to build and deploy to github pages, on merges to master.

If for some reason you need to do a manual deploy you will need a github token. This can be obtained here (you will likely only need the public_repo option).

You can then deploy using:

 GH_TOKEN=<your token> GH_REF=github.com/<your name>/code-for-denver-site.git ./deploy.sh

Review apps

When opening a pull request, heroku is configured to deploy a review app for that pull request so the content can be viewed and tested on an actual website.

How this works

There is a heroku app set up to automatically deploy review apps when it sees pull requests for this repo.

When a pull request is opened, heroku uses the app.json file to set up the configuration for the review app, and after installing npm dependencies runs the command specified in the Procfile.

NOTE: The heroku NPM_CONFIG_PRODUCTION environment variable must be set to false (as seen in app.json) so that all the npm dependencies (including devDependencies) are installed before the app is started