Merge pull request #149 from Nookure/dev #30
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: NookureStaff Update Javadoc | |
on: | |
push: | |
branches: [ release/1.x ] | |
jobs: | |
build-on-ubuntu: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout main branch from GitHub | |
uses: actions/checkout@v4 | |
# Runs a single command using the runners shell | |
- name: Setting up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Execute Gradle build | |
run: | | |
chmod +x gradlew | |
./gradlew NookureStaff-API:javadoc | |
- name: clone JavaDoc | |
run: | | |
ls | |
cd .. | |
git clone https://github.com/Angelillo15/javadocs.git | |
cd javadocs | |
git checkout master | |
cd .. | |
rm -r javadocs/javadocs/NookureStaff/ | |
ls javadocs/javadocs/ | |
cp -r NookureStaff/NookureStaff-API/build/docs/javadoc javadocs/javadocs/NookureStaff/ | |
ls javadocs/javadocs/NookureStaff | |
cd javadocs | |
git config --global user.email [email protected] | |
git config --global user.name Angelillo15 | |
git add . | |
git commit -m "Update javadocs" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.TOKEN }} | |
branch: master | |
directory: /home/runner/work/NookureStaff/javadocs | |
repository: Angelillo15/javadocs |