Files
discordeno/.github/workflows/site.yml
Fleny 2ae8690faa ci: Use node v20 in CI (#4203)
* Use node v20 in CI

* Revert unit tests to use node 18

* Revert "Revert unit tests to use node 18"

This reverts commit 61dbd272f0.
2025-06-21 11:08:25 -05: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: 20
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: 20
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