Skip to content

Commit

Permalink
ci: publish redoc with gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucky3028 committed Dec 10, 2022
1 parent 67a042c commit 3a389ad
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
workflow_call:
jobs:
lint:
name: Lint OpenAPI
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/pub-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish OpenAPI Documents
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
lint:
name: Lint
uses: ./.github/workflows/lint-openapi.yml
build:
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v3
- name: Bundle
run: docker run --rm -v $PWD:/spec redocly/cli bundle schema/openapi.yml -o docs/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./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@v1

0 comments on commit 3a389ad

Please sign in to comment.