Release 1.4.0 #14
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
# This workflow runs the deployJavadoc gradle task and then deploys the javadoc files to GitHub pages. | |
# The javadoc files are stored inside a separate directory for the release. | |
# The release gets added to list of releases in the index.html of the github-pages page. | |
name: Deploy Javadoc (release) | |
# Triggers the workflow on a new release | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy-javadoc-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# get the tag of the release, e.g. v1.1.0 | |
- name: Get tag | |
id: get_tag | |
shell: bash | |
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Set up node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew deployJavadoc | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # deploy javadoc on gh-pages branch | |
folder: javadoc # folder that should be deployed | |
target-folder: ${{ steps.get_tag.outputs.tag }} # where to store the javadoc files (e.g. in directory v1.1.0) | |
update-gh-pages-index-html: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
- name: Get tag | |
id: get_tag | |
shell: bash | |
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" | |
- run: sed -i 's?<!--PLACEHOLDER-->?<!--PLACEHOLDER-->\n <li data-aos="fade-up" class="version">\n <h3>${{ steps.get_tag.outputs.tag }}</h3>\n <p><a href="https://github.com/rwth-acis/las2peer/releases/tag/${{ steps.get_tag.outputs.tag }}">Release notes</a></p>\n <p>Javadoc <a href="/las2peer/${{ steps.get_tag.outputs.tag }}/core/index.html">Core</a>, <a href="/las2peer/${{ steps.get_tag.outputs.tag }}/restmapper/index.html">RESTMapper</a>, <a href="/las2peer/${{ steps.get_tag.outputs.tag }}/webconnector/index.html">WebConnector</a></p>\n </li>?g' index.html | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # deploy javadoc on gh-pages branch | |
folder: . # folder that should be deployed |