Skip to content

Merge pull request #20 from gggmwei/main #44

Merge pull request #20 from gggmwei/main

Merge pull request #20 from gggmwei/main #44

Workflow file for this run

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: Deploy Javadoc
#on:
# release:
# types: [created]
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- run: |
download_url="https://github.com/AdoptOpenJDK/openjdk8-releases/releases/download/jdk8u172-b11/OpenJDK8_x64_Linux_jdk8u172-b11.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: javadoc
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: merge changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git merge origin/main
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
java-version: '1.8'
architecture: x64
cache: maven
- name: Generate javadoc
run: |
mvn javadoc:javadoc
git add .
git commit -m "javadoc updates"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: javadoc