Skip to content

deps: update docusaurus monorepo to v3.6.0 #886

deps: update docusaurus monorepo to v3.6.0

deps: update docusaurus monorepo to v3.6.0 #886

Workflow file for this run

name: publish docs to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**
- "!docs/README.md"
- .github/workflows/docs_publish.yml
- packages/contrast-docs/**
pull_request:
types:
- opened
- reopened
- synchronize
- closed
paths:
- docs/**
- "!docs/README.md"
- .github/workflows/docs_publish.yml
- packages/contrast-docs/**
permissions:
contents: write
pull-requests: write
jobs:
deploy:
name: Publish docs to GitHub Pages
runs-on: ubuntu-22.04
env:
PREVIEW: ${{ !(github.event_name == 'push' && github.ref_name == 'main') }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/setup_nix
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
cachixToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build production website
if: env.PREVIEW == 'false'
run: |
nix build -L .#contrast-docs
- name: Publish docs to GitHub Pages
if: env.PREVIEW == 'false'
uses: JamesIves/github-pages-deploy-action@881db5376404c5c8d621010bcbec0310b58d5e29 # v4.6.8
with:
folder: ./result
branch: gh-pages
clean-exclude: pr-preview
force: false
- name: Build preview website
if: env.PREVIEW == 'true'
run: |
nix build -L --impure --expr "(builtins.getFlake \"git+file://$(pwd)?shallow=1\").outputs.legacyPackages.x86_64-linux.contrast-docs.override { docusaurusBaseUrl = \"contrast/pr-preview/pr-${{ github.event.number }}\"; }"
- name: Deploy preview
if: env.PREVIEW == 'true' && !github.event.pull_request.head.repo.fork
uses: rossjrw/pr-preview-action@430e3dfc1de8a8ae77e77d862d25676ef9db55d1 # v1.4.8
with:
source-dir: ./result