Skip to content

Commit

Permalink
sync docusaurus plugin versions (#9608)
Browse files Browse the repository at this point in the history
* check docusaurus plugin version in CI

add CI check that fails if
docusaurus plugins are out of sync with core

* bump plugins

* provide upgrade advice
  • Loading branch information
chris48s authored Sep 25, 2023
1 parent 2a41780 commit afc2f90
Show file tree
Hide file tree
Showing 3 changed files with 388 additions and 2,275 deletions.
16 changes: 16 additions & 0 deletions .github/scripts/check-docusaurus-versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -euo pipefail

# Docusaurus outputs some important errors as log messages
# but doesn't actually fail
# https://github.com/facebook/docusaurus/blob/v2.4.3/packages/docusaurus/src/server/siteMetadata.ts#L75-L92
# this script runs `docusaurus build`. If it outputs any [ERROR]s, we exit with 1

if ( npm run build 2>&1 | grep '\[ERROR\]' )
then
echo "You probably need to run: npm update @docusaurus/preset-classic"
exit 1
else
exit 0
fi
23 changes: 23 additions & 0 deletions .github/workflows/check-docusaurus-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Check Docusaurus Plugin Versions
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches-ignore:
- 'gh-pages'
- 'dependabot/**'

jobs:
check-docusaurus-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
with:
node-version: 18
cypress: true

- run: .github/scripts/check-docusaurus-versions.sh
Loading

0 comments on commit afc2f90

Please sign in to comment.