For an overview of the project structure please refer to the Gatsby documentation - Building with Components.
- A recent version of Node.js
- Npm: https://www.npmjs.com/get-npm
- Yarn
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
To collaborate on this project first follow the install steps above to create a functional sandbox.
- Fork this repo to your github account.
- In your CLI, add this main repo as a remote named origin
git remote add origin git@github.com:CivicActions/civicactions.com.git
- Add your fork as a remote named myfork (or any preferred name)
git remote add myfork [link used to clone your fork]
- Create a new local branch with the naming convention
CA-xx(ticket number)-brief-ticket-title
and commit your changes to the ticket branch. - After working, run
git pull --rebase origin master
to pull in the latest changes. - Run
npm install
to update the site with any new plugins. - Run
gatsby develop
to make sure the site builds as expected. - Push your changes to your fork
git push myfork
. - Create a PR in the main repo.
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.