Skip to content

Commit

Permalink
Fixes piranhacloud#3860 - Add publishing of SNAPSHOT version of docum…
Browse files Browse the repository at this point in the history
…entation
  • Loading branch information
mnriem committed Aug 27, 2024
1 parent 4d47e0e commit 3da18e0
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,4 @@ jobs:
git add .
git commit -a -m "Publishing Maven plugin documentation" || true
git push
42 changes: 42 additions & 0 deletions .github/workflows/docs-snapshot.yml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions docs/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>cloud.piranha</groupId>
<version>24.9.0-SNAPSHOT</version>

<artifactId>doc</artifactId>
<packaging>pom</packaging>

<name>Piranha</name>

</project>

0 comments on commit 3da18e0

Please sign in to comment.