build-reference.yml 1001 B

12345678910111213141516171819202122232425262728
  1. name: reference
  2. on:
  3. push:
  4. branches-ignore:
  5. - 'gh-pages'
  6. env:
  7. GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  8. GENERATED_BRANCH_NAME: ${GITHUB_REPOSITORY}/${GITHUB_REF##*/}
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout Source
  14. uses: actions/checkout@v2
  15. - name: Generate antora.yml
  16. run: ./gradlew :spring-security-docs:generateAntora
  17. - name: Push generated antora files to the spring-generated-docs
  18. uses: JamesIves/github-pages-deploy-action@4.1.4
  19. with:
  20. branch: ${{ env.GENERATED_BRANCH_NAME }} # The branch the action should deploy to.
  21. folder: "docs/build/generateAntora" # The folder the action should deploy.
  22. repository-name: "spring-io/spring-generated-docs"
  23. token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  24. - name: Dispatch Build Request
  25. run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-io/spring-reference' "$GH_ACTIONS_REPO_TOKEN"