fix ci #17
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: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Build and test | |
| run: mvn -B verify | |
| - name: Generate Javadoc | |
| run: mvn javadoc:javadoc | |
| - name: Copy Javadoc to temp folder | |
| run: | | |
| mkdir -p temp-docs | |
| cp -R target/site/apidocs/* temp-docs/ | |
| - name: Prepare Javadoc for GitHub Pages | |
| run: | | |
| mkdir -p temp-docs | |
| cp -R target/site/apidocs/* temp-docs/ | |
| echo > temp-docs/.nojekyll | |
| echo "# Javadoc site" > temp-docs/README.md | |
| echo '<!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="refresh" content="0; url=index.html"> | |
| <title>Redirecting…</title> | |
| </head> | |
| <body> | |
| <p>If you are not redirected automatically, follow this <a href="index.html">Javadoc</a>.</p> | |
| </body> | |
| </html>' > temp-docs/index.html | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GH_PAGES_TOKEN }} | |
| publish_dir: ./temp-docs | |
| publish_branch: gh-pages | |
| force_orphan: true |