deploy-docs.yml 947 B

12345678910111213141516171819202122232425262728293031
  1. name: Deploy Docs
  2. on:
  3. push:
  4. branches-ignore: [ gh-pages ]
  5. tags: '**'
  6. repository_dispatch:
  7. types: request-build-reference # legacy
  8. schedule:
  9. - cron: '0 10 * * *' # Once per day at 10am UTC
  10. workflow_dispatch:
  11. permissions: read-all
  12. jobs:
  13. build:
  14. runs-on: ubuntu-latest
  15. if: github.repository_owner == 'spring-projects'
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v3
  19. with:
  20. ref: docs-build
  21. fetch-depth: 1
  22. - name: Dispatch (partial build)
  23. if: github.ref_type == 'branch'
  24. env:
  25. GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  26. run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
  27. - name: Dispatch (full build)
  28. if: github.ref_type == 'tag'
  29. env:
  30. GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  31. run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)