publish_docs.yml 908 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: Publish Docs to NPM
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - 'docs/**'
  8. workflow_dispatch:
  9. inputs:
  10. branch:
  11. description: 'Branch to publish from'
  12. required: true
  13. default: 'master'
  14. type: string
  15. jobs:
  16. publish:
  17. runs-on: ubuntu-latest
  18. permissions:
  19. contents: read
  20. id-token: write
  21. defaults:
  22. run:
  23. working-directory: docs
  24. steps:
  25. - name: Checkout
  26. uses: actions/checkout@v4
  27. with:
  28. ref: ${{ inputs.branch || github.ref }}
  29. - name: Setup Node.js
  30. uses: actions/setup-node@v6
  31. with:
  32. node-version: '24.x'
  33. registry-url: 'https://registry.npmjs.org'
  34. - name: Update npm
  35. run: npm install -g npm@latest
  36. - name: Install dependencies
  37. run: npm install
  38. - name: Publish to NPM
  39. run: npm run publish:local