frappe_docker_380b9d0_20260902/.github/workflows/docs-publish-site.yml

86 lines
1.8 KiB
YAML

name: Docs / Publish Site
on:
pull_request:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/docs-publish-site.yml"
merge_group:
push:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/docs-publish-site.yml"
workflow_dispatch:
permissions:
contents: read
defaults:
run:
working-directory: ./docs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docs-build:
name: Docs / Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
- name: Enable Corepack
run: corepack enable
- name: Activate pnpm
run: corepack prepare pnpm@10.28.2 --activate
- name: Show tool versions
run: |
node --version
corepack --version
pnpm --version
which pnpm
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build Docs site
run: pnpm docs:build
- name: Upload artifact
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
uses: actions/upload-pages-artifact@v5
with:
path: docs/.vitepress/dist
deploy:
name: Docs / Deploy
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
needs: docs-build
runs-on: ubuntu-latest
concurrency:
group: pages
cancel-in-progress: true
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5