Skip to content

Commit

Permalink
feat: APIドキュメントをGitHub Pagesにデプロイ
Browse files Browse the repository at this point in the history
  • Loading branch information
arata-nvm committed Feb 7, 2025
1 parent 2a24958 commit fe6c7c9
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
# This GitHub Actions workflow was auto-generated by the `rdme` cli on 2023-10-13T13:20:58.425Z
# You can view our full documentation here: https://docs.readme.com/docs/rdme
name: ReadMe GitHub Action 🦉
name: Generate API documentation

on:
push:
branches:
# This workflow will run every time you push code to the following branch: `main`
# Check out GitHub's docs for more info on configuring this:
# https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
- main
paths:
- "schema.yml"
- feature/gen-api-doc
workflow_dispatch:

jobs:
rdme-openapi:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo 📚
uses: actions/checkout@v4

- name: Run `openapi` command 🚀
uses: readmeio/rdme@v10
- uses: actions/checkout@v4
- run: npx -y @redocly/cli build-docs schema.yml -o public/redocly-static.html
- uses: actions/upload-pages-artifact@v3
id: deployment
with:
rdme: openapi schema.yml --key=${{ secrets.README_API_KEY }} --id=${{ vars.README_ID }}
path: public

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/deploy-pages@v4
id: deployment

0 comments on commit fe6c7c9

Please sign in to comment.