From db7b7d15d5a9f76f60d4dc3092df39df248bce35 Mon Sep 17 00:00:00 2001 From: NOZAKI Shuntaro <60352276+shun-harutaro@users.noreply.github.com> Date: Sun, 18 Aug 2024 21:20:31 +0900 Subject: [PATCH] =?UTF-8?q?redoc=E3=81=A7API=20doc=20=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=97=E3=81=9F=20(#88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create static.yml * static.yml完成 * README更新 * workflow_dispatchに変更 --- .github/workflows/static.yml | 77 ++++++++++++++++++++++++++++++++++++ README.md | 4 +- 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..e90f846 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,77 @@ +name: Deploy API doc to Pages + +on: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Create .env file + run: | + touch .env + echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env + echo "VOICEVOX_API_KEY=${{ secrets.VOICEVOX_API_KEY }}" >> .env + - name: Run docker-compose Build + run: | + docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d + sleep 5 + curl http://localhost + + - name: Wait for the API to be ready + run: | + for i in {1..60}; do + curl -s http://localhost/openapi.json && break + echo "Waiting for API to be ready..." + sleep 2 + done + + - name: Download OpenAPI Specification + run: | + curl -o openapi.json http://localhost/openapi.json + - name: Generate Redoc HTML + run: | + mkdir -p docs + cp openapi.json docs/ + echo ' + +
+