wip #205
Workflow file for this run
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: CrowPi CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
################################################################################ | |
# Checkout repository with submodules | |
################################################################################ | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
################################################################################ | |
# Build Java project with Maven | |
################################################################################ | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build with Maven | |
run: mvn --batch-mode --fail-at-end package javadoc:javadoc | |
- name: Publish Surefire Reports | |
if: ${{ always() }} | |
uses: scacap/action-surefire-report@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
################################################################################ | |
# Publish javadoc on GitHub pages | |
################################################################################ | |
- name: Deploy to GitHub pages | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/site/apidocs | |