docs.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. name: docs
  2. on:
  3. push:
  4. branches:
  5. - main
  6. jobs:
  7. publish-docs:
  8. runs-on: ubuntu-latest
  9. steps:
  10. -
  11. name: Checkout ntfy code
  12. uses: actions/checkout@v3
  13. -
  14. name: Checkout docs pages code
  15. uses: actions/checkout@v3
  16. with:
  17. repository: binwiederhier/ntfy-docs.github.io
  18. path: build/ntfy-docs.github.io
  19. token: ${{secrets.NTFY_DOCS_PUSH_TOKEN}}
  20. # Expires after 1 year, re-generate via
  21. # User -> Settings -> Developer options -> Personal Access Tokens -> Fine Grained Token
  22. -
  23. name: Build docs
  24. run: make docs
  25. -
  26. name: Copy generated docs
  27. run: rsync -av --exclude CNAME --delete server/docs/ build/ntfy-docs.github.io/docs/
  28. -
  29. name: Publish docs
  30. run: |
  31. cd build/ntfy-docs.github.io
  32. git config user.name "GitHub Actions Bot"
  33. git config user.email "<actions@github.com>"
  34. git add docs/
  35. git commit -m "Updated docs"
  36. git push origin main