docs-pages.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Publish the documentation website to GitHub Pages. This workflow is manual-only
  2. # (workflow_dispatch) and intentionally does not listen to pull_request or push:
  3. # the site presents a released snapshot, so publication is an explicit act from a
  4. # dsh-v* tag and must never appear as a PR check. `release:verify` rejects every
  5. # other ref, and the github-pages environment repeats that restriction as a
  6. # deployment tag policy with required reviewers.
  7. #
  8. # The build signal does not depend on this workflow. Every pull request builds
  9. # the production site through `check:ci:static`, and ci-master.yml builds it
  10. # again on master.
  11. name: Deploy documentation
  12. on:
  13. workflow_dispatch:
  14. concurrency:
  15. group: github-pages
  16. cancel-in-progress: false
  17. permissions:
  18. contents: read
  19. env:
  20. PRIMARY_NODE_VERSION: '24'
  21. # Projected source links target the public repository, whose history can
  22. # differ from this workflow's source repository. This stays on master rather
  23. # than following the dispatched tag: that repository advances only to each
  24. # release commit, so its master never carries unreleased work, and it retains
  25. # only the most recent tags — following the tag would leave every projected
  26. # source link on an older deploy unresolvable.
  27. DOCS_REPOSITORY_REF: master
  28. # CI runs must never report to the production telemetry endpoint baked
  29. # into apps/cli/cordis.yml (AppCLIEntry disables the row when set).
  30. DSH_TELEMETRY_DISABLED: '1'
  31. jobs:
  32. build:
  33. runs-on: ubuntu-latest
  34. permissions:
  35. contents: read
  36. pages: read
  37. steps:
  38. # Complete history: the release scripts read tags.
  39. - uses: actions/checkout@v6
  40. with:
  41. fetch-depth: 0
  42. persist-credentials: false
  43. - uses: pnpm/action-setup@v4
  44. - uses: actions/setup-node@v6
  45. with:
  46. node-version: ${{ env.PRIMARY_NODE_VERSION }}
  47. cache: pnpm
  48. - name: Install (immutable)
  49. run: pnpm install --frozen-lockfile
  50. # One definition of "released" for the site and the npm sequence: this
  51. # rejects every ref that is not a dsh-v* tag naming the version this tree
  52. # carries.
  53. - name: Verify release version
  54. env:
  55. RELEASE_PUBLISH: 'true'
  56. run: pnpm run release:verify --family dsh
  57. - name: Configure Pages
  58. id: pages
  59. uses: actions/configure-pages@v6
  60. - name: Verify and build documentation
  61. env:
  62. DOCS_BASE: ${{ steps.pages.outputs.base_path }}/
  63. run: pnpm run doc-sync
  64. - name: Upload Pages artifact
  65. uses: actions/upload-pages-artifact@v5
  66. with:
  67. path: website/.dist
  68. deploy:
  69. needs: build
  70. runs-on: ubuntu-latest
  71. permissions:
  72. pages: write
  73. id-token: write
  74. environment:
  75. name: github-pages
  76. url: ${{ steps.deployment.outputs.page_url }}
  77. steps:
  78. - name: Deploy to GitHub Pages
  79. id: deployment
  80. uses: actions/deploy-pages@v5