2021-03-10 16:08:21 +08:00
|
|
|
# This workflow will build a Java project with Gradle
|
|
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
|
|
|
|
|
|
|
name: Automatically Deploy Javadocs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout 🛎️
|
|
|
|
uses: actions/checkout@v2.3.1
|
|
|
|
|
2022-07-07 01:45:16 +08:00
|
|
|
- name: Set up JDK 🍵
|
2021-07-24 19:23:24 +08:00
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
2022-06-10 21:21:53 +08:00
|
|
|
java-version: '17'
|
2021-03-10 16:08:21 +08:00
|
|
|
- name: Build Javadocs 🔧
|
|
|
|
run: |
|
|
|
|
cd Plan
|
|
|
|
echo "Building javadocs with gradle"
|
|
|
|
./gradlew aggregateJavadocs
|
|
|
|
echo "Moving to working directory:"
|
|
|
|
cd ../
|
|
|
|
mkdir javadocs
|
|
|
|
mkdir javadocs/all
|
|
|
|
mkdir javadocs/api
|
|
|
|
cp -r Plan/build/docs/javadoc/* javadocs/all/
|
|
|
|
cp -r Plan/api/build/docs/javadoc/* javadocs/api/
|
2021-03-10 16:15:35 +08:00
|
|
|
cp scripts/index.html javadocs/index.html
|
2021-03-10 16:08:21 +08:00
|
|
|
cd javadocs
|
|
|
|
touch .nojekyll
|
2021-07-24 19:23:24 +08:00
|
|
|
|
2021-03-10 16:08:21 +08:00
|
|
|
- name: Deploy 🚀
|
2021-07-24 19:23:24 +08:00
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.4
|
2021-03-10 16:08:21 +08:00
|
|
|
with:
|
|
|
|
branch: gh-pages # The branch the action should deploy to.
|
|
|
|
folder: javadocs # The folder the action should deploy.
|
|
|
|
|
|
|
|
|
|
|
|
|