- When cloning the repo, you should pass
--recurse-submodules
to thegit clone
invocation to ensure you also get thekausal_common
submodule checked out. If you have a pre-existing clone, you can update the submodule with:
git submodule update --init
- Install nvm if you don't have it yet.
- Activate the right node version (you can do all steps from 2 to 5 to make sure that the update does not fail).
nvm use
- Make sure the npm version is controlled with corepack:
corepack enable npm
- If you need access to the Kausal private themes:
npx verdaccio-openid@latest --registry https://npm.kausal.tech
npm config set @kausal-private:registry https://npm.kausal.tech
- Install dependencies:
npm i
Make sure that your installation does not give errors about missing files. If it does, there is probably something wrong in step 4.
- To run local development against a Kausal Paths backend, create an
.env
file with the following env variable set to the staging GraphQL API URL. Ask a teammate for this value.
PATHS_BACKEND_URL=
Start the development server with:
npm run dev
Open http://localhost:3000 with your browser to see the result. Note: The address mentioned may differ depending on the instance you are using. For example, it could be something like http://sunnydale.localhost:3000
.
If you want to run the UI against your own backend, configure it in .env
:
PATHS_BACKEND_URL=http://localhost:8000
GitHub actions are configured to handle continuous deployment when deployment/*
branches are updated.
To avoid merge conflicts and ensure deployment branches stay up to date with main
, you can push main
directly to the deployment branch via:
git push origin main:deployment/testing
Swap deployment/testing
out for any of the following depending on the environment you want to update:
deployment/production
: The production environment used by customers and end usersdeployment/testing
: The test environment used by customers and end usersdeployment/staging
: The staging environment primarily used by Kausal, this can be used as a playground and doesn't need to be stable.
When you call sentry-cli (which probably happens automatically when you deploy this project), you need to set an auth token. You can supply this in the environment variable SENTRY_AUTH_TOKEN
or in a file called .sentryclirc
, for example like this:
[auth]
token=your-auth-token