-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (83 loc) · 2.64 KB
/
publish-schemas.yaml
File metadata and controls
86 lines (83 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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