Skip to content

Merge pull request #7 from iMvBremen/feature/api-spec-versions-refactor #25

Merge pull request #7 from iMvBremen/feature/api-spec-versions-refactor

Merge pull request #7 from iMvBremen/feature/api-spec-versions-refactor #25

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish docs
on:
# Allow running the workflow manually from the GitHub UI
workflow_dispatch:
push:
branches:
- main
paths:
# Only run on changes to src
- ".github/workflows/publish-docs.yml"
- "src/**"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Bundle
run: |
npx @redocly/[email protected] bundle ./src/v1beta2/openapi.yaml --output=./build/openapi.yaml
- name: Lint
run: |
npx @redocly/[email protected] lint ./build/openapi.yaml --format=github-actions --skip-rule=no-invalid-media-type-examples --skip-rule=no-unused-components
- name: Build
run: |
npx @redocly/[email protected] build-docs ./build/openapi.yaml --output=./build/index.html
# Deploy docs by creating a new Git commit on `gh-pages` branch
- name: Deploy
uses: peaceiris/actions-gh-pages@v4 # https://github.com/peaceiris/actions-gh-pages
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: oas.zorgapis.nl
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'