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 issue #3445 - Add publishing of Maven plugin documentation to build workflow #3450

Merged
merged 6 commits into from
Jun 19, 2023
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,35 @@ jobs:
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
maven-plugin-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout Piranha
uses: actions/checkout@v3
- name: Checkout Piranha Website
uses: actions/checkout@v3
with:
repository: piranha-cloud/piranha-website
token: ${{ secrets.GIT_PASSWORD }}
path: piranha-website
- name: Set up Java
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: 20
- name: Build with Maven
run: |
mvn -B -DskipTests -DskipITs -ntp install
cd maven/plugins/piranha-maven-plugin
mvn -B -DskipTests -DskipITs -ntp site
cd ../../..
rm -rf piranha-website/maven/piranha-maven-plugin || true
mkdir -p piranha-website/maven/piranha-maven-plugin || true
cp -R maven/plugins/piranha-maven-plugin/target/site/* piranha-website/maven/piranha-maven-plugin/
cd piranha-website
git config --global user.email "[email protected]"
git config --global user.name "Automated publish"
git add .
git commit -a -m "Publishing Maven plugin documentation"
git push