Skip to content

Commit

Permalink
Add github pages (mvn site/javadoc) github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Querela authored Mar 23, 2023
1 parent 83edb19 commit 6055b0d
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Generate site + javadoc github pages

on:
push:
branches: [ "main" ]
workflow_dispatch:

permissions:
contents: read
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
cache: 'maven'

- name: 'Build dependency: fcs-sru-client@main'
run: |
git clone --depth 1 https://github.com/clarin-eric/fcs-sru-client.git
cd fcs-sru-client/
mvn -B install
- name: Generate site (project info and javadoc)
run: mvn -B clean site

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './target/site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
23 changes: 23 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@
<version>2.8.2</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down Expand Up @@ -195,4 +201,21 @@
<url>https://nexus.clarin.eu/content/repositories/Clarin</url>
</repository>
</distributionManagement>

<reporting>
<!-- mvn site -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.2</version>
</plugin>
<!-- javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</reporting>
</project>

0 comments on commit 6055b0d

Please sign in to comment.