sctbdt/README.md

65 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2023-06-15 19:10:18 +00:00
# Cwtch Website
2022-05-11 20:53:53 +00:00
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
or
install [NVM](https://github.com/nvm-sh/nvm) to manage multiple and new NodeJS versions, and then install NodeJS 16
```
$ nvm install 16
$ nvm use 16
```
*nvm only works in bash shell*
2022-05-11 20:53:53 +00:00
### Local Development
```
$ yarn start
```
or
```
$ npm run start
```
2022-05-11 20:53:53 +00:00
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
or
2022-05-11 20:53:53 +00:00
```
$ npm run build
2022-05-11 20:53:53 +00:00
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2023-01-03 18:14:43 +00:00
### Deployment to Stable
2023-01-03 18:14:43 +00:00
Using git.openprivacy.ca to manage but deployment by push is to a separate docs server. Add your key to the docusaurus account's .ssh/authorized_keys and then
2022-05-11 20:53:53 +00:00
```
$ git remote add docs docusaurus@docs.cwtch.im:/home/docusaurus/git/docs.cwtch.im
2023-01-03 18:14:43 +00:00
$ git push docs staging
2022-05-11 20:53:53 +00:00
```
2023-01-03 18:14:43 +00:00
2023-06-07 20:24:22 +00:00
2023-01-03 18:14:43 +00:00
### Deployment to Prod
2023-01-03 18:18:32 +00:00
The staging website must be manually promoted to prod. This can be done by logging into the docs server as `docusarus` and running:
2023-01-03 18:14:43 +00:00
2023-06-07 20:24:22 +00:00
`rsync -a --delete staging/ prod/`