Skip to content

fix: move checkout from composite action to running action #19

fix: move checkout from composite action to running action

fix: move checkout from composite action to running action #19

Workflow file for this run

name: Generate Swagger UI for API specs of data models
env:
JSON_SCHEMA_PATH: example_building_automation/schemas
OUTPUT_ROOT_PATH: example_building_automation/deploy
API_DOCS_PATH: example_building_automation/api_docs
on:
push:
# Adjust branches as needed
branches:
- main
jobs:
set-matrix:
runs-on: ubuntu-latest
concurrency:
group: gh-pages-deployment
cancel-in-progress: false
outputs:
matrix: ${{ steps.build_matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build matrix from API docs
id: build_matrix
uses: ./.github/actions/find-openapi-spec
with:
API_DOCS_PATH: ${{ env.API_DOCS_PATH }}
generate-swagger-ui:
needs: set-matrix
runs-on: ubuntu-latest
strategy:
# Use the dynamically generated matrix.
# Each job will process one API spec file.
matrix:
include: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate Swagger UI using composite action
uses: ./.github/actions/generate-swagger-ui
with:
spec: ${{ matrix.spec }}
base: ${{ matrix.base }}
output: ${{ matrix.output }}
JSON_SCHEMA_PATH: ${{ env.JSON_SCHEMA_PATH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-gh-pages:
runs-on: ubuntu-latest
needs: generate-swagger-ui
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy the site via composite action
uses: ./.github/actions/deploy-gh-pages
with:
OUTPUT_ROOT_PATH: ${{ env.OUTPUT_ROOT_PATH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}