Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
be562aa
feat(rspress): add rspress v2 POC for getting-started docs migration
kduret May 22, 2026
a8e96f1
feat(rspress): migrate full versioned docs (25.10 + 26.10, EN + FR)
kduret May 22, 2026
785f01e
feat(rspress): add custom homepage for version 25.10 (EN + FR)
kduret May 22, 2026
091a3e6
fix(rspress): use version-less links for default version to fix switcher
kduret May 22, 2026
557322c
feat(rspress): custom nav selectors and migrate hardening
kduret May 22, 2026
ce45399
feat(rspress): migrate pp + cloud docs, fix fence regex and asset depth
kduret May 22, 2026
1570ac7
feat(rspress): migrate logmanagement (Centreon Log Management) docs
kduret May 22, 2026
960c714
chore(rspress): upgrade to @rspress/core 2.0.14 and add rsdoctor support
kduret Jun 12, 2026
7063a47
feat(rspress): apply Centreon branding to match docs site
kduret Jun 17, 2026
133b5a9
feat(rspress): match docs site code theme, image zoom and footer
kduret Jun 17, 2026
4b7641b
fix(rspress): serve public assets and de-duplicate nav selectors
kduret Jun 17, 2026
71ec7f7
fix(rspress): prefix default-version sidebar links with /26.10/
kduret Jun 17, 2026
3b75eb6
feat(rspress): add responsive burger menu for the custom nav
kduret Jun 17, 2026
2342417
feat(rspress): migrate Experience Monitoring docs
kduret Jun 17, 2026
68c7df3
feat(rspress): add product switcher to the navbar
kduret Jun 17, 2026
b5431bd
feat(rspress): make navbar sections product-aware, hide version off-prem
kduret Jun 17, 2026
128bfdd
feat(rspress): reorder navbar to match the docs site layout
kduret Jun 17, 2026
f7ad9fd
fix(rspress): point homepage links to the local migrated docs
kduret Jun 17, 2026
e38a39b
fix(rspress): render the site footer on every page
kduret Jun 17, 2026
118beaa
fix(rspress): keep language switch on non-versioned pages
kduret Jun 17, 2026
fdc57e0
perf(rspress): compress raster images at build time
kduret Jun 18, 2026
d5d63e6
perf(rspress): optimize GIF and video assets
kduret Jun 18, 2026
ca86d30
ci(rspress): add Cloudflare Pages preview for pull requests
kduret Jun 18, 2026
0419a60
ci(rspress): keep PR-preview search index under Cloudflare's 25 MiB l…
kduret Jun 18, 2026
e26762f
refactor(rspress): address review findings (a11y, wrangler pin, harde…
kduret Jun 18, 2026
4af017e
Merge remote-tracking branch 'origin/staging' into test-rspress
kduret Jun 18, 2026
ed9a8eb
docs(rspress): refresh migrated content from updated source
kduret Jun 18, 2026
08443f2
ci(rspress): trim the preview search index further
kduret Jun 18, 2026
d9589c2
ci(rspress): index headings instead of truncating preview search
kduret Jun 18, 2026
18af6a1
ci(rspress): cache rspack builds; skip Docusaurus build on this PR
kduret Jun 19, 2026
60dbf1e
perf(rspress): minor build-time and output tweaks
kduret Jun 22, 2026
07c3f69
perf(rspress): minify with a single compress pass
kduret Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main

get-versions:
# Skip the Docusaurus build/preview for the rspress migration PR (the rspress
# site has its own preview workflow). Remove this guard once the migration
# branch is merged. Other branches and the staging push are unaffected.
if: github.head_ref != 'test-rspress'
needs: [dependency-scan]
runs-on: ubuntu-24.04

Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/rspress-pr-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: rspress-pr-preview

# Deploy a Cloudflare Pages preview of the rspress documentation for each pull
# request that touches it, and post the preview URL as a sticky PR comment.
#
# Why Cloudflare Pages: preview deployments are unlimited and independent (one
# stable URL per PR), bandwidth is unlimited, and deploying prebuilt assets with
# wrangler does not consume the Cloudflare build quota — so it scales to many
# concurrent PRs at no cost.
#
# Prerequisites (one-time, by a maintainer):
# - A free Cloudflare account with a Pages project named "centreon-docs-preview".
# - Repository secrets: CLOUDFLARE_API_TOKEN (Pages:Edit) and CLOUDFLARE_ACCOUNT_ID.
# Note: secrets are not exposed to pull requests opened from forks, so previews
# only run for branches pushed to this repository (see the fork guard below).

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'rspress/**'
- '.github/workflows/rspress-pr-preview.yml'

permissions:
contents: read
pull-requests: write

concurrency:
group: rspress-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true

env:
PAGES_PROJECT: centreon-docs-preview

jobs:
preview:
name: Build and deploy preview
runs-on: ubuntu-24.04
# Secrets are unavailable to fork PRs; skip rather than fail.
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5.0.0

- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10
run_install: false

- name: Set up Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
run: |
pnpm install \
--frozen-lockfile \
--config.trustPolicy=no-downgrade \
--config.minimumReleaseAge=2880 \
--config.blockExoticSubdeps=true
shell: bash

- name: Restore rspack build cache
# Reuse rspack's persistent build cache between runs to speed up rebuilds
# (rspack invalidates only the modules that changed).
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4.1.2
with:
path: rspress/node_modules/.cache
key: rspack-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}
restore-keys: |
rspack-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-
rspack-${{ runner.os }}-

- name: Build rspress site
# Drop code blocks from the search index so each per-language index stays
# under Cloudflare Pages' 25 MiB per-file limit (preview only).
env:
PREVIEW_BUILD: 'true'
run: pnpm --filter centreon-documentation-rspress build
shell: bash

- name: Reduce preview search index to headings
# Preview-only: rebuild the search index from page headings (title +
# H2/H3) so it stays well under Cloudflare Pages' 25 MiB per-file limit.
# Staging/production keep the full-text index.
working-directory: rspress
run: node scripts/trim-preview-search-index.mjs
shell: bash

- name: Deploy to Cloudflare Pages
id: deploy
working-directory: rspress
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
BRANCH_ALIAS: pr-${{ github.event.pull_request.number }}
run: |
# Create the project on first run (no-op if it already exists).
pnpm exec wrangler pages project create "$PAGES_PROJECT" \
--production-branch staging 2>/dev/null || true

pnpm exec wrangler pages deploy doc_build \
--project-name "$PAGES_PROJECT" \
--branch "$BRANCH_ALIAS" \
--commit-dirty=true

echo "url=https://${BRANCH_ALIAS}.${PAGES_PROJECT}.pages.dev" >> "$GITHUB_OUTPUT"
shell: bash

- name: Comment preview URL
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
header: rspress-preview
message: |
📘 **rspress documentation preview**

${{ steps.deploy.outputs.url }}

Updated on every push to this pull request.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
# Production
/build

# Generated files
# Generated files
.cache-loader
.docusaurus/
rspress/doc_build
rspress/node_modules
harmonize_tabs.php
migrate_tabs.php
clean_file.php
Expand Down
Loading
Loading