docs-pages.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. # Projected source links target the public repository, whose history can
  23. # differ from this workflow's source repository.
  24. DOCS_REPOSITORY_REF: master
  25. # CI runs must never report to the production telemetry endpoint baked
  26. # into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
  27. DSH_TELEMETRY_DISABLED: '1'
  28. jobs:
  29. build:
  30. runs-on: ubuntu-latest
  31. permissions:
  32. contents: read
  33. pages: read
  34. steps:
  35. - uses: actions/checkout@v6
  36. - uses: pnpm/action-setup@v4
  37. - uses: actions/setup-node@v6
  38. with:
  39. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  40. cache: pnpm
  41. - name: Install (immutable)
  42. run: pnpm install --frozen-lockfile
  43. - name: Configure Pages
  44. id: pages
  45. uses: actions/configure-pages@v6
  46. - name: Verify and build documentation
  47. env:
  48. DOCS_BASE: ${{ steps.pages.outputs.base_path }}/
  49. run: pnpm run doc-sync
  50. - name: Upload Pages artifact
  51. uses: actions/upload-pages-artifact@v5
  52. with:
  53. path: website/.dist
  54. deploy:
  55. needs: build
  56. runs-on: ubuntu-latest
  57. permissions:
  58. pages: write
  59. id-token: write
  60. environment:
  61. name: github-pages
  62. url: ${{ steps.deployment.outputs.page_url }}
  63. steps:
  64. - name: Deploy to GitHub Pages
  65. id: deployment
  66. uses: actions/deploy-pages@v5