Merge pull request #68 from textkernel/fix-ci #6
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
| # This workflow will generate javadocs, build, and test a package using Maven | |
| name: docs-publish | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: #add this option in case of a failure and we need to re-run | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up JDK 1.8 | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: 1.8 | |
| # generate the javadocs into the target/site/apidocs folder (default) | |
| - name: Generate javadocs with Maven | |
| run: mvn javadoc:javadoc | |
| # upload the generated docs into an artifact that can be used by the job below | |
| - name: Upload Artifacts | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: target/site/apidocs | |
| deploy: | |
| needs: build | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |