aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml2
-rwxr-xr-xutil/generate-latest-docs.sh1
-rw-r--r--util/publish-snapshot-on-commit.sh6
3 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7ae87fd7..dbd1514a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -62,7 +62,7 @@ jobs:
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
- run: mvn source:jar javadoc:jar deploy -DskipTests=true -f build-pom.xml
+ run: ./util/publish-snapshot-on-commit.sh
generate_docs:
name: 'Generate latest docs'
diff --git a/util/generate-latest-docs.sh b/util/generate-latest-docs.sh
index 6c307a4d..88c8e7fb 100755
--- a/util/generate-latest-docs.sh
+++ b/util/generate-latest-docs.sh
@@ -16,6 +16,7 @@ cd gh-pages
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
git rm -rf api/latest
+mkdir -p api # Just to make mv work if the directory is missing
mv ${TARGET}/site/apidocs api/latest
git add -A -f api/latest
git commit -m "Latest javadoc on successful CI build auto-pushed to gh-pages"
diff --git a/util/publish-snapshot-on-commit.sh b/util/publish-snapshot-on-commit.sh
new file mode 100644
index 00000000..f7d8cc01
--- /dev/null
+++ b/util/publish-snapshot-on-commit.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -e
+
+mvn -B dependency:go-offline test clean -U --quiet --fail-never -DskipTests=true -f build-pom.xml
+mvn source:jar javadoc:jar deploy -DskipTests=true -f build-pom.xml