Skip to content

Merge pull request #160 from GreatTeacherOni/docs/sheets/jvk-blatt1 #80

Merge pull request #160 from GreatTeacherOni/docs/sheets/jvk-blatt1

Merge pull request #160 from GreatTeacherOni/docs/sheets/jvk-blatt1 #80

Workflow file for this run

name: Deploy GitHub Pages
env:
gh_pages_index_prefix: |
<html>
<head>
<title>FIUS JVK Documentation</title>
</head>
<body>
<h1>FIUS JVK Documentation</h1>
<p> This is the documentation for the java project of the FIUS.</p>
<p> If you are looking for the code, see <a href="https://github.com/fius/jvk">github.com/fius/jvk</a></p>
<h2>Contents</h2>
<ul>
gh_pages_index_suffix: |
</ul>
</body>
</html>
on:
push:
branches: [ master ]
tags: [ '**' ]
release:
types: [ published, edited ]
workflow_dispatch: {}
jobs:
generate_javadoc:
permissions:
packages: write
name: Generate Javadoc
runs-on: ubuntu-latest
steps:
- name: Calculate ref
run: echo "REF_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Setup Oracle JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: oracle # Might also be the distribution used by the students
cache: maven
- name: Generate Javadoc with Maven
run: cd ./project; mvn -B install javadoc:javadoc
- name: Deploy Javadoc to `/project/target/site/apidocs/`
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./project/target/site/apidocs/
destination_dir: ./${{ env.REF_NAME }}
generate_index:
name: Generate Index
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages
- name: Generate index
run: |
#!/usr/bin/env bash
echo "$gh_pages_index_prefix" > index.html
for path in * ;do
if [ -d $path ] ;then
echo '<li><a href="'"$path"'">'"$path"'</a></li>' >> index.html
fi
done
echo "$gh_pages_index_suffix" >> index.html
- name: Commit index
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update index