[ci] force settings for doc publishing #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Github CI | |
on: [ push, pull_request ] | |
env: | |
MAVEN_OPTS: -Dmaven.artifact.threads=256 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
jobs: | |
build: | |
name: Main Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone | |
id: clone | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
id: java21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
cache: 'maven' | |
- name: Build | |
run: mvn package -e | |
- name: Remove Snapshots Before Caching | |
run: find ~/.m2/repository -name '*SNAPSHOT' | xargs rm -Rf | |
deploy-doc: | |
if: github.ref == 'refs/heads/main' | |
name: Documentation | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone | |
id: clone | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
id: java21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
cache: 'maven' | |
- name: Deploy-Documentation | |
run: mvn package -s .github/settings.xml -Pgh-pages -e -DskipTests | |
- name: Remove Snapshots Before Caching | |
run: find ~/.m2/repository -name '*SNAPSHOT' | xargs rm -Rf |