/civicactions.com

CivicActions home site

Primary LanguageJavaScriptOtherNOASSERTION

civicactions.com

CivicActions home site

For an overview of the project structure please refer to the Gatsby documentation - Building with Components.

Requirements

Install

Clone the git repository:

git clone git@github.com:CivicActions/civicactions.com.git

Go to the top level directory:

cd civicactions

Make sure that you have the Gatsby CLI program installed:

npm install --global gatsby-cli

And run from your CLI:

yarn

Fire up the development server:

cd gatsby-example-site
gatsby develop

You should see the site by going to http://localhost:8000/ in your browser. To turn off the server run Ctrl + C

Development Workflow

To collaborate on this project first follow the install steps above to create a functional sandbox.

Create your fork and add git remotes (one time)

  1. Fork this repo to your github account.
  2. In your CLI, add this main repo as a remote named origin
git remote add origin git@github.com:CivicActions/civicactions.com.git
  1. Add your fork as a remote named myfork (or any preferred name)
git remote add myfork [link used to clone your fork]

Working in local branch

  1. Create a new local branch with the naming convention CA-xx(ticket number)-brief-ticket-title and commit your changes to the ticket branch.
  2. After working, run git pull --rebase origin master to pull in the latest changes.
  3. Run npm install to update the site with any new plugins.
  4. Run gatsby develop to make sure the site builds as expected.
  5. Push your changes to your fork git push myfork.
  6. Create a PR in the main repo.

Deploy

Deploying the static site in Github pages

To deploy the current work in the master branch run:

npm run deploy

This will push updated changes to the origin/gh-pages branch which updates the static page.