From 3f2bade4f13fa6967d4f54b4b40489faf0d04e4d Mon Sep 17 00:00:00 2001 From: Dan Allen Date: Mon, 21 Nov 2022 17:49:18 -0700 Subject: [PATCH] sync and refactor docs build - upgrade Antora to 3.2.0-alpha.2 - remove Antora patch to support linked worktrees - upgrade Antora Collector to latest alpha - remove dispatch.sh script (handled by gh run workflow) - consistently use gh run workflow to trigger workflows - remove step to publish generated docs (no longer in use) --- .github/actions/dispatch.sh | 5 ---- .github/workflows/antora-generate.yml | 41 --------------------------- .github/workflows/deploy-docs.yml | 3 ++ 3 files changed, 3 insertions(+), 46 deletions(-) delete mode 100755 .github/actions/dispatch.sh delete mode 100644 .github/workflows/antora-generate.yml diff --git a/.github/actions/dispatch.sh b/.github/actions/dispatch.sh deleted file mode 100755 index 955e9cbbee..0000000000 --- a/.github/actions/dispatch.sh +++ /dev/null @@ -1,5 +0,0 @@ -REPOSITORY_REF="$1" -TOKEN="$2" - -curl -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${TOKEN}" --request POST --data '{"event_type": "request-build-reference"}' https://api.github.com/repos/${REPOSITORY_REF}/dispatches -echo "Requested Build for $REPOSITORY_REF" diff --git a/.github/workflows/antora-generate.yml b/.github/workflows/antora-generate.yml deleted file mode 100644 index 69b7258443..0000000000 --- a/.github/workflows/antora-generate.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Generate Antora Files and Request Build - -on: - workflow_dispatch: - push: - branches-ignore: - - 'gh-pages' - tags: '**' - -env: - GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - if: ${{ github.repository == 'spring-projects/spring-security' }} - 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 - - name: Extract Branch Name - id: extract_branch_name - run: echo "##[set-output name=generated_branch_name;]$(echo ${GITHUB_REPOSITORY}/${GITHUB_REF##*/})" - - name: Push generated antora files to the spring-generated-docs - uses: JamesIves/github-pages-deploy-action@4.1.4 - with: - 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. - repository-name: "spring-io/spring-generated-docs" - token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} - - name: Dispatch Build Request - run: ${GITHUB_WORKSPACE}/.github/actions/dispatch.sh 'spring-projects/spring-security' "$GH_ACTIONS_REPO_TOKEN" diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 6279ea3a22..32b9f5056d 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,5 +1,8 @@ name: Deploy Docs on: + push: + branches-ignore: [ gh-pages ] + tags: '**' repository_dispatch: types: request-build-reference # legacy schedule: