build(deps): bump org.elasticsearch.client:elasticsearch-rest-client … #20
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: Build and Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: aws-athena-query-federation_ubuntu-latest_16-core | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'corretto' | |
java-version: '11' | |
- name: Build Javadoc with Maven | |
run: mvn -B javadoc:aggregate --file pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=WARN --no-transfer-progress | |
- name: Switch to gh-pages branch | |
run: | | |
git fetch | |
git checkout gh-pages | |
- name: Remove old files | |
run: rm -rf com | |
- name: Copy new files | |
run: cp -r target/reports/apidocs/* . | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
#add any untracked files in the com dir | |
git add com | |
#commit only if there is a diff | |
git diff-index --quiet HEAD || git commit -m "Syncing javadoc from master:$GITHUB_SHA" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages |