This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
🤓 Documentation 🤓 #1465
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: 🤓 Documentation 🤓 | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
schedule: | |
- cron: '23 0 * * *' | |
jobs: | |
generate-docs: | |
name: 🔧 Generate and Publish Docs | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: write | |
services: | |
kaoto: | |
image: kaotoio/backend:main | |
ports: | |
# will assign a random free host port | |
- 8081/tcp | |
steps: | |
- name: 🏠 Checkout repository | |
uses: actions/checkout@v4 | |
- name: ⛏️ Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "14" | |
- run: npm install | |
- run: mkdir docs | |
- run: sudo apt-get update; sudo apt-get install xdot | |
- run: npm run docs | |
- run: curl http://localhost:${{ job.services.kaoto.ports[8081] }}/q/openapi?type=json > /tmp/openapi.json | |
- run: wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.33/swagger-codegen-cli-3.0.33.jar | |
- run: java -jar swagger-codegen-cli-3.0.33.jar generate -i /tmp/openapi.json -l html2 -o docs/api/ | |
- name: 🚀 deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs |