antora-generate.yml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. name: Generate Antora Files and Request Build
  2. on:
  3. push:
  4. branches-ignore:
  5. - 'gh-pages'
  6. tags: '**'
  7. env:
  8. GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  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: Extract Branch Name
  18. id: extract_branch_name
  19. run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
  20. - name: Push generated antora files to the spring-generated-docs
  21. uses: JamesIves/github-pages-deploy-action@4.1.4
  22. with:
  23. branch: ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
  24. folder: "docs/build/generateAntora" # The folder the action should deploy.
  25. repository-name: "spring-io/spring-generated-docs"
  26. token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  27. - name: Dispatch Build Request
  28. run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN"