docs.yml 822 B

123456789101112131415161718192021222324252627282930313233
  1. name: docs
  2. on:
  3. push:
  4. branches:
  5. - main
  6. paths:
  7. - 'docs/**'
  8. - 'mkdocs.yml'
  9. permissions:
  10. contents: write
  11. jobs:
  12. deploy:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - uses: actions/checkout@v4
  16. - name: Configure Git Credentials
  17. run: |
  18. git config user.name github-actions[bot]
  19. git config user.email 41898282+github-actions[bot]@users.noreply.github.com
  20. - uses: actions/setup-python@v5
  21. with:
  22. python-version: 3.x
  23. - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
  24. - uses: actions/cache@v4
  25. with:
  26. key: mkdocs-material-${{ env.cache_id }}
  27. path: .cache
  28. restore-keys: |
  29. mkdocs-material-
  30. - run: pip install -r docs/requirements.txt
  31. - run: mkdocs gh-deploy --force