fix: Update docusaurus peer dependencies #449
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
# Prevent duplicates runs for PRs from non-forks. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
defaults: | |
run: | |
# TODO: Our package.json scripts currently assume that they are run | |
# from bash, even on Windows. | |
# We should probably make them OS-agnostic instead. | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
node-version: [16.x, 18.x] | |
docusaurus-version: | |
- "v2.4.0" | |
- "v2.3.1" | |
- "v2.2.0" | |
- "v2.1.0" | |
- "v2.0.1" | |
- "canary" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
# Uninstall nodejieba for the moment, as it's not compatible with Node 18 on Windows. | |
# TODO: Remove this once a new version of nodejieba is released (the fix is already on its master branch). | |
- run: npm uninstall --ignore-scripts --save -w packages/docusaurus-search-local nodejieba | |
if: runner.os == 'Windows' && matrix.node-version == '18.x' | |
- run: npm ci | |
- run: npm run lint | |
- run: npm install --workspaces --save-dev '@docusaurus/core@${{ matrix.docusaurus-version }}' '@docusaurus/preset-classic@${{ matrix.docusaurus-version }}' '@docusaurus/module-type-aliases@${{ matrix.docusaurus-version }}' '@docusaurus/plugin-content-blog@${{ matrix.docusaurus-version }}' '@docusaurus/plugin-content-docs@${{ matrix.docusaurus-version }}' '@docusaurus/plugin-content-pages@${{ matrix.docusaurus-version }}' '@docusaurus/theme-common@${{ matrix.docusaurus-version }}' '@docusaurus/theme-classic@${{ matrix.docusaurus-version }}' '@docusaurus/types@${{ matrix.docusaurus-version }}' | |
- run: npm dedupe | |
- run: npm run build | |
- run: npm run test | |
# Install OS dependencies | |
# Run `apt update` beforehand to avoid 404 Not Found errors during apt install. | |
- run: sudo apt update | |
if: runner.os == 'Linux' | |
- run: npx playwright install-deps | |
# Install Browsers | |
- run: npx playwright install | |
- run: npm run test:e2e -- -- --browser=all --forbid-only | |
# TODO: Cannot run browser tests for these for now. | |
- run: npm run build -w example-docs -- --config docusaurus.config.noTrailingSlash.js | |
- run: npm run build -w example-docs -- --config docusaurus.config.subDirectory.js | |
- run: npm run build -w example-docs -- --config docusaurus.config.noTrailingSlashSubdirectory.js |