logos-press-engine/README.md

91 lines
2.1 KiB
Markdown
Raw Normal View History

2023-09-06 02:07:11 +00:00
# Logos Press Engline
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
The repository for [press.logos.co](https://press.logos.co/) website.
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
**Tech Stacks**
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
- NextJS : React Framework
- [LSD](https://github.com/acid-info/lsd) : Design System
- Hookstate : State Management
- Emotion: CSS-in-JS
2024-01-22 14:26:26 +00:00
- [Strapi](https://strapi.io/) : CMS
2023-09-06 02:07:11 +00:00
## Environment Variables
Please check the environment values in `.env` located in the root directory.
```
SIMPLECAST_ACCESS_TOKEN=
REVALIDATE_WEBHOOK_TOKEN=
NEXT_PUBLIC_SITE_URL=https://press.logos.co
FATHOM_SITE_ID=
2023-09-06 02:07:11 +00:00
```
This is a template for `.env.local`, which is included in `.gitignore`.
To find the Simplecast access token, follow these steps on the Simplecast dashboard:
1. Click the gear button in the top-right corner.
2. Select `Private Apps` to acquire your JWT bearer token.
## How to Run Locally
1. Clone this repository
```bash
$ git clone https://github.com/acid-info/logos-press-engine.git
```
2. Install the dependencies:
```bash
$ yarn install
```
3. Start the development server:
2023-04-14 14:29:32 +00:00
```bash
2023-09-06 02:07:11 +00:00
$ yarn dev
2023-04-14 14:29:32 +00:00
```
2023-09-06 02:07:11 +00:00
4. Visit `http://localhost:3000` in your browser
2023-08-25 10:19:03 +00:00
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
## How to Run a Static Build (Production Build)
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
1. Generate static files for production:
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
```bash
$ yarn build
```
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
The static files will be created in the `build` directory.
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
2. Serve the static build:
```bash
$ yarn start
```
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
4. Visit `http://localhost:3000` in your browser
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
## CI/CD
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
- The `master` branch is automatically deployed to the production server (e.g., logos.co) through [CI](https://ci.infra.status.im)
- The `develop` branch is automatically deployed to the staging server (e.g., dev.logos.co) through [CI](https://ci.infra.status.im)
2023-04-14 14:29:32 +00:00
2023-09-06 02:07:11 +00:00
## Change Process
2023-09-06 02:07:11 +00:00
1. Create a new working branch from `develop`: `git checkout develop; git checkout -b my-changes`.
2023-09-06 02:07:11 +00:00
2. Make your changes, push them to the `origin`, and open a Pull Request against the `develop` branch.
2023-09-06 02:07:11 +00:00
3. After approval, merge the pull request, and verify the changes on the staging server (https://dev-press.logos.co/).
2023-09-06 02:07:11 +00:00
4. When ready to promote changes to the live website, create a pull request against the "master" branch, based on the "develop" branch.