Skip to content

Commit 0830704

Browse files
authored
Antora (#462)
* Use providers.provider for modifiedFile This defers the looking up of modifiedFiles until it is used. It also allows other tasks to be ran from the non-primary worktree. Working in another worktree is essential for Antora which will clone each branch/tag into a new worktree to process it. * Move Asdiidoc Attributes to antora.yml This ensures the attributes are available for the docs-build branch as well. * Fix GitHub Actions Permissions The permission actions: write is necessary so that pushes to branches and tags can invoke the deploy-docs workflow on the docs-build branch
1 parent c94cfee commit 0830704

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

Diff for: .github/workflows/deploy-docs-antora.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ on:
44
branches-ignore: [ gh-pages ]
55
tags: '**'
66
workflow_dispatch:
7-
permissions: read-all
7+
permissions:
8+
actions: write
89
jobs:
910
build:
1011
runs-on: ubuntu-latest

Diff for: gradle/update-copyrights.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (gitPresent) {
66

77
ext {
88
if (gitPresent) {
9-
modifiedFiles = files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') }
9+
modifiedFiles = providers.provider { files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') } }
1010
}
1111
}
1212

@@ -29,7 +29,7 @@ project.afterEvaluate {
2929
else {
3030
onlyIf { gitPresent && !System.getenv('GITHUB_ACTION') }
3131
if (gitPresent) {
32-
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) })
32+
inputs.files(modifiedFiles.map(files -> files.filter { f -> f.path.contains(subproject.name) }))
3333
}
3434
}
3535
outputs.dir('build')

Diff for: spring-pulsar-docs/src/main/antora/antora-playbook.yml

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ asciidoc:
2626
hide-uri-scheme: '@'
2727
tabs-sync-option: '@'
2828
chomp: 'all'
29-
listener-class: PulsarListener@
30-
template-class: PulsarTemplate@
3129
extensions:
3230
- '@asciidoctor/tabs'
3331
- '@springio/asciidoctor-extensions'

Diff for: spring-pulsar-docs/src/main/antora/antora.yml

+4
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ ext:
1010
local: true
1111
scan:
1212
dir: spring-pulsar-docs/build/generated-antora-resources
13+
asciidoc:
14+
attributes:
15+
listener-class: PulsarListener@
16+
template-class: PulsarTemplate@

0 commit comments

Comments
 (0)