Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

CivicActions/civicactions.com

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

civicactions.com ARCHIVE

NOTE: This repo has been archived - development continues at https://github.com/CivicActions/civicactions-homesite

CivicActions home site

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

Requirements

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.

Install

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

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 [email protected]: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. Follow the instructions above to activate.
  4. Run yarn 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

Pull requests are deployed automatically when merged.