Files
discordeno/.github/workflows/site.yml
Fleny 70bcd16e8d chore(website): Update docusarus v3.8, improve build perf (#4209)
* Update docusaurus to v3.8, improve performance

Docusaurus:
- Update to v3.8.0
- Enable new faster features, rspack bundler cache and worker threads
- Update CI to cache rspack bundler cache
- Update dependencies to latest versions
- Update blog posts to use the truncate tag
- Update caniuse-lite

Removed duplicated type documentation generation for bot package

* Use .jsonc files for typedoc
And use the readme option instead of a custom script

* remvoe typedoc script

---------

Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>
2025-06-02 07:47:19 +02:00

88 lines
2.2 KiB
YAML

name: Deploy Docs Site
on:
push:
branches: ['main']
paths:
- 'website/**'
- '.github/workflows/site.yml'
- 'typedoc.json'
- 'package.json'
- 'packages/**'
pull_request:
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: |
yarn.lock
website/yarn.lock
- name: yarn install (root)
run: yarn install --immutable
- name: Build all pkg
run: yarn release-build
- name: Build docs
run: yarn build:doc
- run: yarn install --immutable
working-directory: ./website
- name: Restore bundler cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-docusaurus-bundler-${{ github.sha }}
path: ./website/node_modules/.cache
restore-keys: |
${{ runner.os }}-docusaurus-bundler-
- name: Build website
run: yarn build
working-directory: ./website
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./website/build
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
cache-dependency-path: |
yarn.lock
website/yarn.lock
- name: yarn install (root)
run: yarn install --immutable
- name: Build all pkg
run: yarn release-build
- name: Build docs
run: yarn build:doc
- run: yarn install --immutable
working-directory: ./website
- run: yarn typecheck
working-directory: ./website
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
concurrency: deploy-site
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4