Skip to content

fix(hub): prune orphaned hub sources on collection URL rename (#339) #275

fix(hub): prune orphaned hub sources on collection URL rename (#339)

fix(hub): prune orphaned hub sources on collection URL rename (#339) #275

Workflow file for this run

name: Deploy Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'website/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'README.md'
- '.github/workflows/docs.yml'
pull_request:
branches: [main]
paths:
- 'docs/**'
- 'website/**'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'README.md'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: read
env:
NODE_VERSION: "24"
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
permissions:
contents: read
# Read-only: commenting happens in post-pr-comment.yml via workflow_run.
pull-requests: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Report pre-existing vulnerabilities on PR
if: github.event_name == 'pull_request'
uses: ./.github/actions/npm-audit-pr-comment
with:
working-directory: ${{ github.workspace }}/website
package-manager: pnpm
min-severity: high
label: website
- name: Run website tests
run: pnpm -C website run test
- name: Build documentation
run: pnpm -C website run build
- name: Setup Pages
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/configure-pages@v5
- name: Upload build artifact
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: actions/upload-pages-artifact@v3
with:
path: website/build
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4