Skip to content

Commit 3bdacab

Browse files
committed
Updated docs for custom build command
1 parent 82d30a4 commit 3bdacab

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/README-deploy.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,15 @@ To override the default Maven command:
127127
with:
128128
branches: ${{ inputs.branches }}
129129
custom_build_command: |
130-
./mvnw clean install -B
131-
./mvnw verify -B
130+
if [[ "$SHOULD_DEPLOY" == "true" ]]; then
131+
./mvnw clean deploy -Pdocs,deploy,spring -B -U
132+
else
133+
echo "Will not deploy artifacts"
134+
./mvnw clean install -Pspring -B -U
135+
fi
132136
```
137+
When using a custom_build_command there is an environment variable named `SHOULD_DEPLOY` which indicates that the JDK being used is the one we should deploy snapshots from (currently JDK 8 if supported or JDK 17). This is also the JDK
138+
we should use to build docs. This is why in the snippet above we call the `deploy` goal and add the `docs` and `deploy` profiles when `SHOULD_DEPLOY` is true.
133139

134140
## Configuration
135141

0 commit comments

Comments
 (0)