Merge pull request #62 from BlazingTwist/16-create-more-tests #35
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 is a basic workflow to help you get started with Actions | |
name: Generate GitHub Pages | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "master" branch | |
push: | |
branches: [ "master" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
name: Generate Javadoc and Api-docs | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 20 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '20' | |
distribution: 'temurin' | |
cache: maven | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Install ApiDoc Generators | |
run: | | |
npm install -g @asyncapi/generator | |
npm install -g @redocly/cli | |
- name: Generate JavaDoc | |
run: mvn clean compile javadoc:javadoc | |
- name: Generate ApiDoc | |
run: | | |
ag --output ./docs/api-docs/asyncapi/ ./src/main/resources/dx/AsyncApi.schema.yml @asyncapi/html-template | |
redocly build-docs ./src/main/resources/dx/Swagger.schema.yml --output=./docs/api-docs/swagger.html | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload docs dir | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './docs' | |
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 }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |