NOTE: This repo has been archived - development continues at https://github.com/CivicActions/civicactions-homesite
For an overview of the project structure please refer to the Gatsby documentation - Building with Components.
Alternatively you can use a recent version of Node.js and Yarn - however Docker is the preferred environment as it matches CI and production environments.
Clone the git repository:
git clone [email protected]:CivicActions/civicactions.com.git
Go to the top level directory:
cd civicactions.com
Source an activate script. This will make CLI tools (running in Docker) available on your terminal and also download NPM dependencies.
. bin/activate
Fire up the development server:
yarn develop
You should see the site by going to http://localhost:8000/ in your browser.
To turn off the server run Ctrl + C
To see gatsby sub-commands available run:
gatsby
To see other scripts useful for development:
yarn run
You can also test a full build which will run with some additional compression steps and serve the site with the Caddy web server, albeit without hot reloading.
fullbuild
You should see the site by going to http://localhost:8000/ in your browser.
To turn off the server run Ctrl + C
To stop development and use your local versions of CLI tools run:
deactivate
If you encounter problems you can force a rebuild by deleting the sandbox and/or full images and reactivate:
deactivate
docker rmi -f home-sandbox home-full
. bin/activate
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 [email protected]: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. - Follow the instructions above to activate.
- Run
yarn 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.
Pull requests are deployed automatically when merged.