Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/website-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release website

permissions:
contents: write

on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'website/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: bash
working-directory: ./website

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
cache-dependency-path: './website/package-lock.json'

- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v4
with:
path: build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
33 changes: 13 additions & 20 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,29 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: bash
working-directory: ./website

jobs:
website-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Get Bun cache directory
id: bun-cache-dir
run: echo "dir=$(bun pm cache)" >> ${GITHUB_OUTPUT}

- name: Cache Bun dependencies
uses: actions/cache@v4
- uses: actions/setup-node@v6
with:
path: |
${{ steps.bun-cache-dir.outputs.dir }}
~/.bun/install/cache
key: ${{ runner.os }}-bun-lint-${{ hashFiles('**/bun.lockb', '**/package.json', '**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-lint-
${{ runner.os }}-bun-
node-version: 24
cache: 'npm'
cache-dependency-path: './website/package-lock.json'

- name: Install website dependencies
run: cd website && bun install --frozen-lockfile
- name: Install dependencies
run: npm ci

- name: Check MDX
run: cd website && bun linter
run: npm run linter

- name: Build website
run: cd website && bun run build
run: npm run build
10 changes: 6 additions & 4 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,31 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
## Installation

```bash
bun install
npm install
```

## Local Development

```bash
bun start
npm run start
```

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

```bash
bun run build
npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

There is a GitHub action deploying automatically the website when pushing changes to the website folder on main.

```bash
USE_SSH=true bun run deploy
USE_SSH=true npm run deploy
```

We are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Loading