2021-11-08 13:35:57 -06:00
|
|
|
name: Generate Antora Files and Request Build
|
2021-07-27 13:02:21 -05:00
|
|
|
|
|
|
|
on:
|
2022-01-18 12:56:29 -06:00
|
|
|
workflow_dispatch:
|
2021-07-27 13:02:21 -05:00
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- 'gh-pages'
|
2022-01-18 12:56:06 -06:00
|
|
|
tags: '**'
|
2021-07-27 13:02:21 -05:00
|
|
|
|
|
|
|
env:
|
2021-09-27 13:29:29 -05:00
|
|
|
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
2021-07-27 13:02:21 -05:00
|
|
|
|
2022-06-12 00:31:28 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-07-27 13:02:21 -05:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-07-28 14:17:42 -05:00
|
|
|
if: ${{ github.repository == 'spring-projects/spring-security' }}
|
2021-07-27 13:02:21 -05:00
|
|
|
steps:
|
|
|
|
- name: Checkout Source
|
|
|
|
uses: actions/checkout@v2
|
2022-07-27 11:07:42 -05:00
|
|
|
- name: Set up gradle
|
|
|
|
uses: spring-io/spring-gradle-build-action@v1
|
2022-06-22 15:21:29 -03:00
|
|
|
with:
|
|
|
|
java-version: '17'
|
2022-07-27 11:07:42 -05:00
|
|
|
distribution: 'temurin'
|
2021-08-20 17:08:39 -05:00
|
|
|
- name: Generate antora.yml
|
|
|
|
run: ./gradlew :spring-security-docs:generateAntora
|
2021-10-25 14:56:53 -05:00
|
|
|
- name: Extract Branch Name
|
|
|
|
id: extract_branch_name
|
2021-10-25 15:05:06 -05:00
|
|
|
run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})"
|
2021-09-27 13:29:29 -05:00
|
|
|
- name: Push generated antora files to the spring-generated-docs
|
2021-08-20 17:08:39 -05:00
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.4
|
|
|
|
with:
|
2021-10-25 15:05:06 -05:00
|
|
|
branch: ${{ steps.extract_branch_name.outputs.generated_branch_name }} # The branch the action should deploy to.
|
2021-08-20 17:08:39 -05:00
|
|
|
folder: "docs/build/generateAntora" # The folder the action should deploy.
|
2021-09-27 13:29:29 -05:00
|
|
|
repository-name: "spring-io/spring-generated-docs"
|
|
|
|
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
|
2021-07-27 13:02:21 -05:00
|
|
|
- name: Dispatch Build Request
|
2021-11-08 13:35:57 -06:00
|
|
|
run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN"
|