From 3da18e0c198427ea177149a07e4dc67ed38286ab Mon Sep 17 00:00:00 2001 From: Manfred Riem Date: Tue, 27 Aug 2024 17:11:45 -0500 Subject: [PATCH] Fixes #3860 - Add publishing of SNAPSHOT version of documentation --- .github/workflows/build.yml | 1 + .github/workflows/docs-snapshot.yml | 42 +++++++++++++++++++++++++++++ docs/pom.xml | 14 ++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/docs-snapshot.yml create mode 100644 docs/pom.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 814aeb1548..a50979dfab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,3 +177,4 @@ jobs: git add . git commit -a -m "Publishing Maven plugin documentation" || true git push + diff --git a/.github/workflows/docs-snapshot.yml b/.github/workflows/docs-snapshot.yml new file mode 100644 index 0000000000..480433be45 --- /dev/null +++ b/.github/workflows/docs-snapshot.yml @@ -0,0 +1,42 @@ +name: docs-snapshot +on: + push: + paths: + - 'docs/**' + branches: + - 'current' + tags-ignore: + - 'v*' +jobs: + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout Piranha + uses: actions/checkout@v3 + - name: Checkout Piranha Website + uses: actions/checkout@v3 + with: + repository: piranhacloud/piranha-website + token: ${{ secrets.GIT_PASSWORD }} + path: piranha-website + ref: 'gh-pages' + - name: Set up Java 21 + uses: actions/setup-java@v3 + with: + cache: 'maven' + distribution: 'temurin' + java-version: 21 + - name: Build with Maven + run: | + cd docs + mvn -B -DskipTests -DskipITs -ntp site + cd ../ + rm -rf piranha-website/snapshot || true + mkdir -p piranha-website/snapshot || true + cp -R docs/target/site/* piranha-website/snapshot/ + cd piranha-website + git config --global user.email "noreply@piranha.cloud" + git config --global user.name "Automated publish" + git add . + git commit -a -m "Publishing documentation" || true + git push \ No newline at end of file diff --git a/docs/pom.xml b/docs/pom.xml new file mode 100644 index 0000000000..d5c4d594f3 --- /dev/null +++ b/docs/pom.xml @@ -0,0 +1,14 @@ + + + + 4.0.0 + + cloud.piranha + 24.9.0-SNAPSHOT + + doc + pom + + Piranha + +