Skip to content

Deploy OpenAPI site to Pages #5

Deploy OpenAPI site to Pages

Deploy OpenAPI site to Pages #5

Workflow file for this run

name: Deploy OpenAPI site to Pages
on:
push:
branches: [$default-branch]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate site
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: dynamic-html
generator-tag: v7.5.0
config-file: openapi-generator/dynamic-html/config.json
openapi-file: typespec/tsp-output/@typespec/openapi3/openapi.yaml
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
with:
path: ./dynamic-html-client/docs
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4