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