Javadoc Deployer #683
This file contains hidden or 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: Javadoc Deployer | |
| 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@v6 | |
| - name: Clean up folder | |
| run: rm -rf Slimefun4/ | |
| - name: Clone repository | |
| run: git clone -b dev --single-branch --depth=1 https://github.com/SlimefunGuguProject/Slimefun4 | |
| - name: Set up Java 21 JDK | |
| uses: actions/setup-java@v3.11.0 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| java-package: jdk | |
| architecture: x64 | |
| - name: Generate Javadocs | |
| run: cd Slimefun4 && chmod +x ./gradlew && ./gradlew javadoc | |
| # Move to keep old dir and not need to rewrite everything | |
| - run: rm -rf Slimefun4/docs && mv Slimefun4/build/docs/javadoc Slimefun4/docs | |
| - name: Push Javadoc | |
| uses: EndBug/add-and-commit@v10 | |
| with: | |
| github_token: ${{ secrets.ACCESS_TOKEN }} | |
| add: 'Slimefun4/docs' | |
| push: 'origin master --force' | |
| message: 'Update javadoc' | |
| author_name: 'noraincity-bot' | |
| author_email: ${{ secrets.BOT_EMAIL }} | |
| committer_name: 'noraincity-bot' | |
| committer_email: ${{ secrets.BOT_EMAIL }} |