isomerpages / isomercms-frontend

Frontend for the Singapore Government's static website builder and host
MIT License
9 stars 9 forks source link

IsomerCMS Frontend

This repo contains the source code for the IsomerCMS frontend.

How it works

The frontend is built using React and hosted on Netlify. The frontend interacts with the IsomerCMS backend server, which in turn calls GitHub APIs to modify code in the users' Isomer website repo.

How to develop

source .env
npm install
npm run start

Setting up GitGuardian

To setup, follow these instructions:

  1. Install GitGuardian
brew install gitguardian/tap/ggshield
  1. Add the API Key to your .env file
# Service API key from GitGuardian account
export GITGUARDIAN_API_KEY=abc123

Notes:

Only if necessary,

Running end-to-end tests using Cypress

Add the following Cypress environment variables:

Add the following environment variables which we use to reset our test repo:

Run the following:

source .env
npm run test-e2e

If you would like the Cypress UI, run

npm run cypress:open

For more information on setup, read the cypress/SETUP.md

Release

Run the following on the release branch to tag and push changes automatically:

npm run release --isomer_update=<versionType>

where versionType corresponds to npm version types. This only works on non-Windows platforms, for Windows, modify the release script to use %npm_config_update% instead of $npm_config_update.