Javadocs Generator #2540
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
name: Javadocs Generator | |
on: | |
# Manual workflow trigger | |
workflow_dispatch: {} | |
# Run every ~12 hours | |
schedule: | |
- cron: '0 */12 * * *' | |
jobs: | |
javadocs: | |
name: Generate javadocs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Clean up folder | |
run: rm -rf Slimefun4/ | |
- name: Clone repository | |
run: git clone https://github.com/TheBusyBiscuit/Slimefun4 | |
- name: Set up Java 17 JDK | |
uses: actions/[email protected] | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
java-package: jdk | |
architecture: x64 | |
- name: Generate Javadocs | |
run: cd Slimefun4 && mvn javadoc:javadoc | |
# Move to keep old dir and not need to rewrite everything | |
- run: rm -rf Slimefun4/docs && mv Slimefun4/javadocs Slimefun4/docs | |
- name: Push to repository | |
uses: github-actions-x/[email protected] | |
with: | |
github-token: ${{ secrets.ACCESS_TOKEN }} | |
push-branch: 'master' | |
commit-message: 'Updated Javadocs' | |
force-add: 'true' | |
files: Slimefun4/docs | |
name: TheBusyBot | |
email: ${{ secrets.BOT_EMAIL }} |