spring-security/.github/workflows/antora-generate.yml

42 lines
1.4 KiB
YAML
Raw Normal View History

2021-11-08 14:35:57 -05:00
name: Generate Antora Files and Request Build
2021-07-27 14:02:21 -04:00
on:
workflow_dispatch:
2021-07-27 14:02:21 -04:00
push:
branches-ignore:
- 'gh-pages'
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
permissions:
contents: read
2021-07-27 14:02:21 -04:00
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.repository == 'spring-projects/spring-security' }}
2021-07-27 14:02:21 -04:00
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Set up gradle
uses: spring-io/spring-gradle-build-action@v1
with:
java-version: '17'
distribution: 'temurin'
- 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
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.
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"