Skip to content

Create ci-deploy-openapi.yml #1

Create ci-deploy-openapi.yml

Create ci-deploy-openapi.yml #1

name: Build & Deploy API Spec.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
paths:
- .github/workflows/ci-deploy-openapi.yml
- 'api/spec/openapi.yml'
- 'api/spec/index.html'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'api/spec'
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4