part_docs.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. on:
  2. workflow_call: {}
  3. name: "Documentation"
  4. permissions:
  5. contents: read
  6. jobs:
  7. generate:
  8. name: "Generate"
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Harden Runner
  12. uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
  13. with:
  14. egress-policy: audit
  15. - name: Checkout Code
  16. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  17. - name: SetUp PHP
  18. id: setup-php
  19. uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2
  20. with:
  21. php-version: "8.3"
  22. tools: phive
  23. - name: Cache Tools
  24. uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
  25. id: cache
  26. with:
  27. path: ~/.phive
  28. key: tools-${{ runner.os }}-${{ steps.setup-php.outputs.php-version }}-${{ hashFiles('**/phars.xml') }}
  29. restore-keys: |
  30. tools-${{ runner.os }}-${{ steps.setup-php.outputs.php-version }}-
  31. tools-${{ steps.setup-php.outputs.php-version }}-
  32. tools-
  33. - name: Install Tools
  34. run: composer run install:tools
  35. - name: Generate Docs
  36. run: composer run docs:generate
  37. - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
  38. with:
  39. name: docs
  40. path: docs
  41. - name: Package for GitHub Pages
  42. uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
  43. with:
  44. path: docs