docs-pages.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. name: Deploy documentation
  2. on:
  3. push:
  4. branches: [master]
  5. paths:
  6. - '.github/workflows/docs-pages.yml'
  7. - 'docs/**'
  8. - 'package.json'
  9. - 'pnpm-lock.yaml'
  10. - 'pnpm-workspace.yaml'
  11. - 'scripts/project-doc-site.ts'
  12. - 'scripts/project-doc-site.spec.ts'
  13. - 'website/**'
  14. workflow_dispatch:
  15. concurrency:
  16. group: github-pages
  17. cancel-in-progress: false
  18. permissions:
  19. contents: read
  20. env:
  21. PRIMARY_NODE_VERSION: '24'
  22. jobs:
  23. build:
  24. runs-on: ubuntu-latest
  25. permissions:
  26. contents: read
  27. pages: read
  28. steps:
  29. - uses: actions/checkout@v6
  30. - uses: actions/setup-node@v6
  31. with:
  32. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  33. - name: Enable corepack (pnpm)
  34. run: corepack enable
  35. - name: Resolve pnpm store path
  36. id: pnpm-store
  37. run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
  38. - uses: actions/cache@v4
  39. with:
  40. path: ${{ steps.pnpm-store.outputs.path }}
  41. key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
  42. restore-keys: |
  43. ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
  44. - name: Install (immutable)
  45. run: pnpm install --frozen-lockfile
  46. - name: Configure Pages
  47. id: pages
  48. uses: actions/configure-pages@v5
  49. - name: Verify and build documentation
  50. env:
  51. DOCS_BASE: ${{ steps.pages.outputs.base_path }}/
  52. run: pnpm run doc-sync
  53. - name: Upload Pages artifact
  54. uses: actions/upload-pages-artifact@v4
  55. with:
  56. path: website/.dist
  57. deploy:
  58. needs: build
  59. runs-on: ubuntu-latest
  60. permissions:
  61. pages: write
  62. id-token: write
  63. environment:
  64. name: github-pages
  65. url: ${{ steps.deployment.outputs.page_url }}
  66. steps:
  67. - name: Deploy to GitHub Pages
  68. id: deployment
  69. uses: actions/deploy-pages@v4