Skip to content

Commit

Permalink
Generate site and push to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Nov 12, 2023
1 parent 68ace19 commit d2e5457
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,33 @@ jobs:
shasum -a 256 -c codecov.SHA256SUM
chmod -v +x codecov
./codecov -v
site:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest

needs:
- build

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Generate site
run: ./mvnw -B site

- name: Upload site
uses: actions/upload-pages-artifact@v2
with:
path: target/site

- name: Deploy site
id: site
uses: actions/deploy-pages@v2
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@

<organization>
<name>Ashley Scopes (GitHub)</name>
<url>${project.url}</url>
<url>${project-organisation-url}</url>
</organization>

<url>${project-site-url}</url>

<scm>
<url>scm:git:${project-scm-url}</url>
<connection>scm:git:${project-scm-url}</connection>
Expand All @@ -85,6 +87,7 @@
<maven-invoker-plugin.version>3.6.0</maven-invoker-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-plugin-plugin.version>3.10.1</maven-plugin-plugin.version>
<maven-project-info-reports-plugin.version>3.4.5</maven-project-info-reports-plugin.version>
<maven-surefire-plugin.version>3.2.1</maven-surefire-plugin.version>

<!-- Plugin dependencies -->
Expand All @@ -98,6 +101,7 @@
</argLine>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project-organization-url>https://github.com/ascopes</project-organization-url>
<project-site-url>https://ascopes.github.io/protobuf-maven-plugin</project-site-url>
<project-scm-url>${project.organization.url}/protobuf-maven-plugin</project-scm-url>
</properties>

Expand Down Expand Up @@ -352,6 +356,12 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven-project-info-reports-plugin.version}</version>
</plugin>

<plugin>
<!-- Unit testing config -->
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit d2e5457

Please sign in to comment.