Cadence docs is built using Docusaurus.
$ npm install
$ npm run start
This command starts a local development server and opens up a browser window at http://localhost:3000/. Most changes are reflected live without having to restart the server.
$ npm run build
This command generates static content into the build
directory and can be served using any static contents hosting service.
In order to deploy to multiple environments, some configuration options in docusaurus.config.ts
are made available for override through environment variables.
# Can be replaced by your GH pages url, ie. https://<userId>.github.io/
CADENCE_DOCS_URL=https://cadenceworkflow.io
# For GitHub pages deployment, it is often /<projectName>/ defaults to `/`
BASE_URL=/cadence-docs/
# For Github pages only, this is your Github org/user name.
ORGANIZATION_NAME=cadence-workflow
A file static/CNAME
should be present in order to deploy to a github pages site that uses a custom domain. I.E. cadenceworkflow.io
This file is created by the deploy action, but if deploying from a local environment, care should be taken to ensure the file exists.
Using SSH:
$ USE_SSH=true npm run deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> npm run deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages
branch.
The release pages rely on data from GitHub that is persisted as json files under static/data/releases/
.
In order to update the release information for display, this can be done manually or be set up as part of the CI/CD process by running the scripts/fetch-releases.sh
script. Script uses the GitHub CLI to fetch the release data.
Automatic updates to release data are performed by a github action fetch-release-data
. Which will check if new data is available, and if so update the release data with the latest information and open a branch named fetch-release-data
and open a PR if one is not open already.
Manual approval is required before merging and continuing to deployment.
Ensure you have a .npmrc
file configured with registry=https://registry.npmjs.org/
.
This will ensure the dependencies are pulled from the correct source and to prevent internal npm registries from being pushed onto the package-lock.json
MIT License, please see LICENSE for details.