Skip to content

Commit

Permalink
Add job for publishing site
Browse files Browse the repository at this point in the history
  • Loading branch information
mizosoft committed Feb 10, 2024
1 parent 4ac4191 commit 21f7983
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/publish-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish site

on:
push:
branches: [ master, refactor-workflows ]

env:
BASE_JAVA: 11
BASE_OS: ubuntu-latest

jobs:
publish-site:
name: Publish site
runs-on: ${{ env.BASE_OS }}
steps:
- uses: actions/checkout@v4

# MkDocs needs python to run.
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11.1

- name: Setup Gradle
uses: ./.github/actions/gradle
with:
java: ${{ env.BASE_JAVA }}

- name: Generate docs
run: chmod +x ./generate-docs.sh && ./generate-docs.sh

- name: Deploy site
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: site
2 changes: 1 addition & 1 deletion generate-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ python -m pip install mkdocs-material

# Generate docs.
python -m mkdocs build
./gradlew clean aggregateJavadoc
./gradlew aggregateJavadoc

# Copy generated Javadoc site to main site directory.
mkdir -p site/$JAVADOC_SITE_PATH
Expand Down

0 comments on commit 21f7983

Please sign in to comment.