Files
discordeno/.github/workflows/site.yml
dependabot[bot] ad81e8ab33 build(deps): bump actions/upload-pages-artifact from 4 to 5 (#4970)
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2026-04-21 05:00:24 +05:30

99 lines
2.8 KiB
YAML

name: Deploy Docs Site
permissions:
contents: read
on:
push:
branches: ['main']
pull_request:
workflow_dispatch:
jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
cache: yarn
cache-dependency-path: |
yarn.lock
website/yarn.lock
- name: yarn install (root)
run: yarn install --immutable
- name: Cache for Turbo
uses: rharkor/caching-for-turbo@v2.3.13
with:
cache-prefix: turbo-cache-
- name: Cache for Turbo
uses: rharkor/caching-for-turbo@v2.3.13
with:
cache-prefix: turbo-cache-website-
server-port: 41231 # The default is 41230, but we use a different cache key so we need a different port
- name: Build all pkg
run: yarn release-build
- name: Build docs
run: yarn turbo build:doc --single-package
- run: yarn install --immutable
working-directory: ./website
- name: Restore bundler cache
uses: actions/cache@v5
with:
key: ${{ runner.os }}-docusaurus-bundler-${{ github.sha }}
path: ./website/node_modules/.cache
restore-keys: |
${{ runner.os }}-docusaurus-bundler-
- name: Build website
run: yarn turbo build
working-directory: ./website
env:
TURBO_API: http://localhost:41231
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./website/build
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
cache: yarn
cache-dependency-path: |
yarn.lock
website/yarn.lock
- name: yarn install (root)
run: yarn install --immutable
- name: Cache for Turbo
uses: rharkor/caching-for-turbo@v2.3.13
with:
cache-prefix: turbo-cache-
- name: Build all pkg
run: yarn release-build
- name: Build docs
run: yarn turbo build:doc --single-package
- 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
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5