fix: stop the Redis retry storm from burying the logs #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: OpenAPI publish | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| publish: | |
| name: Generate and publish OpenAPI | |
| runs-on: ubuntu-latest | |
| # peaceiris/actions-gh-pages pushes to the gh-pages branch; the default | |
| # GITHUB_TOKEN is read-only, which returned 403. Grant write access. | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run openapi:gen | |
| - run: | | |
| mkdir -p ./openapi-site | |
| cp openapi.json ./openapi-site/openapi.json | |
| cat > ./openapi-site/index.html <<'EOF' | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <title>Lens OpenAPI</title> | |
| <link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css" /> | |
| </head> | |
| <body> | |
| <div id="swagger-ui"></div> | |
| <script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"></script> | |
| <script> | |
| window.onload = () => { | |
| window.ui = SwaggerUIBundle({ | |
| url: 'openapi.json', | |
| dom_id: '#swagger-ui', | |
| presets: [SwaggerUIBundle.presets.apis], | |
| layout: 'BaseLayout' | |
| }) | |
| } | |
| </script> | |
| </body> | |
| </html> | |
| EOF | |
| - uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./openapi-site | |
| publish_branch: gh-pages | |
| user_name: 'github-actions[bot]' | |
| user_email: 'github-actions[bot]@users.noreply.github.com' |