generate-docs.yaml 1.0 KB

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