docs.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: Documentation
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. permissions:
  10. contents: read
  11. pages: write
  12. id-token: write
  13. concurrency:
  14. group: pages
  15. cancel-in-progress: false
  16. jobs:
  17. # Runs on pull requests too, so a broken build is caught before it merges.
  18. build:
  19. name: Build
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v7
  23. - uses: actions/configure-pages@v6
  24. # uv installs from the committed uv.lock, so the build is reproducible.
  25. - uses: astral-sh/setup-uv@v10.0.1
  26. with:
  27. enable-cache: true
  28. - run: uv run zensical build --clean
  29. # Zensical has no plugin API yet, so llms.txt and llms-full.txt are
  30. # generated from the built site here.
  31. - run: uv run python scripts/gen_llms.py site
  32. - uses: actions/upload-pages-artifact@v5
  33. with:
  34. path: site
  35. deploy:
  36. name: Deploy
  37. if: github.event_name == 'push' && github.ref == 'refs/heads/main'
  38. needs: build
  39. environment:
  40. name: github-pages
  41. url: ${{ steps.deployment.outputs.page_url }}
  42. runs-on: ubuntu-latest
  43. steps:
  44. - uses: actions/deploy-pages@v5
  45. id: deployment