Merge pull request #3 from styx-api/dependabot/github_actions/actions… #24
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: Build and publish docs | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-publish-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: pyproject.toml | |
| - name: Install the project | |
| run: uv sync --only-group docs | |
| - name: Generate JSON schemas | |
| run: | | |
| mkdir -p public | |
| uv run boutiques-schema-generator-all | |
| - name: Create index file | |
| run: | | |
| cat > public/index.html << EOL | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Boutiques JSON Schemas</title> | |
| <style> | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; | |
| line-height: 1.6; | |
| color: #333; | |
| max-width: 800px; | |
| margin: 0 auto; | |
| padding: 20px; | |
| } | |
| h1 { color: #2c3e50; } | |
| ul { padding-left: 20px; } | |
| li { margin-bottom: 10px; } | |
| a { color: #3498db; text-decoration: none; } | |
| a:hover { text-decoration: underline; } | |
| .schema-link { display: flex; align-items: center; } | |
| .json-badge { | |
| background-color: #f1c40f; | |
| color: #333; | |
| padding: 3px 6px; | |
| border-radius: 3px; | |
| font-size: 0.8em; | |
| margin-left: 10px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>Boutiques JSON Schemas</h1> | |
| <p>Select a schema version to view:</p> | |
| <ul> | |
| <li> | |
| <div class="schema-link"> | |
| <a href="boutiques-0.5.json">Boutiques 0.5</a> | |
| <span class="json-badge">JSON</span> | |
| </div> | |
| </li> | |
| <li> | |
| <div class="schema-link"> | |
| <a href="boutiques-styx-descriptor-1.json">Boutiques Styx Descriptor 1</a> | |
| <span class="json-badge">JSON</span> | |
| </div> | |
| </li> | |
| </ul> | |
| </body> | |
| </html> | |
| EOL | |
| - uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: public |