Make sure to have installed:
- Node > 16
- Git
- Pnpm
git clone git@github.com:lyonjs/lyonjs.github.com.git
pnpm installpnpm build, build next output of the website and run eslintpnpm fmt, format all files with prettierpnpm fmt:check, check format all files with prettierpnpm dev, start a local dev server on port 3000pnpm export, export the website as static html filepnpm e2e, run e2e test with Playwright
We use husky to install and handle git hooks on pre-commit to pre-run lint and format on files before even pushing them on github.
Normally, they should be installed with the first pnpm install
flowchart LR
A[Meetup GraphQL API]-->|fetch events| E[Enhance Event data]
subgraph Internal Website data
C[Sponsors] --> B
D[Organisators] -->B
E-->B[Next Static props]
end
The site is deployed on Scaleway Serverless Containers. The CI pipeline (.github/workflows/integration.yml) handles everything automatically.
flowchart LR
P[Push / PR] --> CI[CI: format + build]
CI --> D[Docker build & push]
D -->|push master| SCR[Scaleway Container Registry]
D -->|push master| GHCR[GitHub Container Registry]
D -->|PR| SCR
SCR -->|push master| PROD[Production container<br/>min-scale=1]
SCR -->|PR| PREVIEW[Preview container<br/>min-scale=0]
- Production (
master): the container is always warm (min-scale=1,max-scale=5). Deployed automatically on every push tomaster. - Preview (pull requests): a
preview-pr-<N>container is created per PR with scale-to-zero (min-scale=0). The preview URL appears in the PR via GitHub Environments ("View deployment" button). The container and image tag are automatically cleaned up when the PR is closed (.github/workflows/deploy-cleanup.yml).
Images are pushed to two registries:
- Scaleway Container Registry (
rg.fr-par.scw.cloud/lyonjs/lyonjs.github.com) — used by Serverless Containers for deployment - GitHub Container Registry (
ghcr.io/lyonjs/lyonjs.github.com) — archive/backup, push onmasteronly
The DEPLOY_ENV variable (production or preview) controls whether CSP security headers are applied in middleware.ts.
Secrets: SCW_ACCESS_KEY, SCW_SECRET_KEY, SCW_DEFAULT_PROJECT_ID, SCW_DEFAULT_ORGANIZATION_ID
Variables: SCW_REGISTRY_ENDPOINT, SCW_PROD_NAMESPACE_ID, SCW_PREVIEW_NAMESPACE_ID, SCW_PROD_CONTAINER_ID
If you need to add sponsors, videos, descriptions, speakers to a passed or programmed event, you sadly have to add it manually in a file. In data-override.ts, you can override each event by absolute url and override some informations.