File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Docs
2
+ run-name : ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }}
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ build-refname :
7
+ description : Enter git refname to build (e.g., main).
8
+ required : false
9
+ push :
10
+ branches : [ docs-build ]
11
+ permissions :
12
+ contents : write
13
+ jobs :
14
+ build :
15
+ if : github.repository_owner == 'spring-projects-experimental'
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - name : Checkout
19
+ uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 5
22
+ - name : Set up JDK 17
23
+ uses : actions/setup-java@v4
24
+ with :
25
+ java-version : ' 17'
26
+ distribution : ' temurin'
27
+ cache : maven
28
+ - name : Set up refname build
29
+ if : github.event.inputs.build-refname
30
+ run : |
31
+ git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }}
32
+ export BUILD_REFNAME=${{ github.event.inputs.build-refname }}
33
+ echo "BUILD_REFNAME=$BUILD_REFNAME" >> $GITHUB_ENV
34
+ export BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:pom.xml | python3 -c "import xml.etree.ElementTree as xml; from sys import stdin; print(xml.parse(stdin).getroot().find('{http://maven.apache.org/POM/4.0.0}version').text)")
35
+ echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV
36
+ - name : Run Antora
37
+ run : |
38
+ ./mvnw -pl spring-grpc-docs antora
39
+ - name : Publish Docs
40
+ uses :
spring-io/spring-doc-actions/[email protected]
41
+ with :
42
+ docs-username : ${{ secrets.DOCS_USERNAME }}
43
+ docs-host : ${{ secrets.DOCS_HOST }}
44
+ docs-ssh-key : ${{ secrets.DOCS_SSH_KEY }}
45
+ docs-ssh-host-key : ${{ secrets.DOCS_SSH_HOST_KEY }}
46
+ site-path : spring-grpc-docs/target/antora/site
You can’t perform that action at this time.
0 commit comments