antora-generate.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. name: Generate Antora Files and Request Build
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches-ignore:
  6. - 'gh-pages'
  7. tags: '**'
  8. env:
  9. GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  10. jobs:
  11. build:
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout Source
  15. uses: actions/checkout@v2
  16. - name: Generate antora.yml
  17. run: ./gradlew :spring-security-docs:generateAntora
  18. - name: Extract Branch Name
  19. id: extract_branch_name
  20. run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
  21. - name: Push generated antora files to the spring-generated-docs
  22. uses: JamesIves/github-pages-deploy-action@4.1.4
  23. with:
  24. branch: ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
  25. folder: "docs/build/generateAntora" # The folder the action should deploy.
  26. repository-name: "spring-io/spring-generated-docs"
  27. token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  28. - name: Dispatch Build Request
  29. run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN"