build-reference.yml 1.1 KB

123456789101112131415161718192021222324252627282930
  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. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout Source
  13. uses: actions/checkout@v2
  14. - name: Generate antora.yml
  15. run: ./gradlew :spring-security-docs:generateAntora
  16. - name: Extract Branch Name
  17. id: extract_branch_name
  18. run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
  19. - name: Push generated antora files to the spring-generated-docs
  20. uses: JamesIves/github-pages-deploy-action@4.1.4
  21. with:
  22. branch: ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
  23. folder: "docs/build/generateAntora" # The folder the action should deploy.
  24. repository-name: "spring-io/spring-generated-docs"
  25. token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
  26. - name: Dispatch Build Request
  27. run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-io/spring-reference' "$GH_ACTIONS_REPO_TOKEN"