From 1d116384eddf82c17073fd4da7b05d260828cf3d Mon Sep 17 00:00:00 2001 From: Arata Date: Sat, 8 Feb 2025 04:40:07 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20API=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=92GitHub=20Pages=E3=81=AB=E3=83=87?= =?UTF-8?q?=E3=83=97=E3=83=AD=E3=82=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 70e27cb..77fd5cb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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/index.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