Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3860 - Add publishing of SNAPSHOT version of documentation #3861

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading