Skip to content

Commit

Permalink
Fix problem with building Javadoc on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgecrw committed Jun 29, 2023
1 parent 2cdc8ce commit 37da31a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/release_to_maven_central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- name: Get source code version number
id: gitversion
run: echo "version=$(grep -o "versionString = .*;" src/main/java/com/fazecast/jSerialComm/SerialPort.java | grep -o "\".*\"" | grep -o [^\"].*[^\"])" >> $GITHUB_OUTPUT
run: echo "version=$(grep -o "versionString = [^, ;]*" src/main/java/com/fazecast/jSerialComm/SerialPort.java | grep -o "\".*\"" | grep -o [^\"].*[^\"])" >> $GITHUB_OUTPUT

- name: Build native libraries using Docker toolchain
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -66,16 +66,18 @@ jobs:
makeLatest: true
draft: true

- name: Update Javadoc library documentation
- name: Check out library documentation
uses: actions/checkout@v3
with:
ref: gh-pages
path: documentation
- run: rm -rf documentation/binaries/* documentation/javadoc && mv build/docs/javadoc documentation/ && sed -i "s/jSerialComm-[^j]*jar/jSerialComm-${{ steps.gitversion.outputs.version }}.jar/g" documentation/index.html

- name: Update Javadoc library documentation
run: rm -rf documentation/binaries/* documentation/javadoc && mv build/docs/javadoc documentation/ && sed -i "s/jSerialComm-[^j]*jar/jSerialComm-${{ steps.gitversion.outputs.version }}.jar/g" documentation/index.html

- name: Publish new library documentation
uses: s0/git-publish-subdir-action@v2.6.0
with:
env:
REPO: self
BRANCH: gh-pages
FOLDER: documentation
Expand Down

0 comments on commit 37da31a

Please sign in to comment.