generate-docs.yaml 1021 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Generate CLI Docs
  2. on:
  3. workflow_dispatch:
  4. jobs:
  5. build-docs:
  6. runs-on: ubuntu-latest
  7. steps:
  8. - name: Checkout repository
  9. uses: actions/checkout@v4
  10. - name: Setup .NET
  11. uses: actions/setup-dotnet@v4
  12. with:
  13. dotnet-version: '10.0.x'
  14. - name: Ensure publish directory exists
  15. run: mkdir -p RackPeek/publish
  16. - name: Copy config folder into publish directory
  17. run: |
  18. if [ -d RackPeek/config ]; then
  19. cp -r RackPeek/config RackPeek/publish/config
  20. fi
  21. - name: Make script executable
  22. run: chmod +x generate-docs.sh
  23. - name: Run documentation generator
  24. run: ./generate-docs.sh
  25. - name: Commit and push generated docs
  26. run: |
  27. git config user.name "github-actions"
  28. git config user.email "github-actions@github.com"
  29. git add CommandIndex.md Commands.md
  30. git commit -m "Update CLI docs" || echo "No changes to commit"
  31. git push