-
Notifications
You must be signed in to change notification settings - Fork 2
218 lines (206 loc) · 7.75 KB
/
Copy pathdocs.yml
File metadata and controls
218 lines (206 loc) · 7.75 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# .github/workflows/deploy-docc.yml
name: Deploy DocC Documentation
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
actions: read
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Get repository name
id: repo-name
run: echo "REPO_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT
- name: Build DocC Documentation
uses: ./.github/actions/build-docc
with:
products: 'ValidatorCore,ValidatorUI'
docc-paths: 'Sources/ValidatorCore/Validator.docc,Sources/ValidatorUI/ValidatorUI.docc'
bundle-identifier-prefix: 'dev.validator'
bundle-version: '1.0.0'
platforms: 'iOS,macOS,watchOS,tvOS,visionOS'
output-path: './docs'
hosting-base-path: '${{ steps.repo-name.outputs.REPO_NAME }}'
- name: Create Index Page
run: |
cat > docs/index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Validator Documentation</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: #f5f5f7;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 40px 20px;
color: #1d1d1f;
}
.container {
max-width: 980px;
width: 100%;
}
header {
text-align: center;
margin-bottom: 60px;
}
h1 {
font-size: 56px;
font-weight: 600;
letter-spacing: -0.005em;
line-height: 1.07143;
margin-bottom: 8px;
color: #1d1d1f;
}
.subtitle {
font-size: 28px;
font-weight: 400;
line-height: 1.14286;
color: #6e6e73;
}
.docs-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
gap: 24px;
margin-bottom: 40px;
}
.doc-card {
background: white;
border-radius: 18px;
padding: 40px;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
text-decoration: none;
display: block;
border: 1px solid rgba(0,0,0,0.06);
}
.doc-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.doc-card h2 {
font-size: 32px;
font-weight: 600;
margin-bottom: 12px;
color: #1d1d1f;
letter-spacing: -0.003em;
}
.doc-card p {
font-size: 17px;
line-height: 1.47059;
color: #6e6e73;
margin-bottom: 20px;
}
.doc-card .link {
font-size: 17px;
color: #0071e3;
font-weight: 400;
display: inline-flex;
align-items: center;
}
.doc-card .link::after {
content: '→';
margin-left: 8px;
transition: transform 0.3s ease;
}
.doc-card:hover .link::after {
transform: translateX(4px);
}
.module-badge {
display: inline-block;
background: #f5f5f7;
color: #6e6e73;
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.5px;
text-transform: uppercase;
margin-bottom: 16px;
}
footer {
text-align: center;
padding-top: 40px;
border-top: 1px solid rgba(0,0,0,0.08);
margin-top: 40px;
}
footer p {
font-size: 14px;
color: #86868b;
}
@media (max-width: 768px) {
h1 {
font-size: 40px;
}
.subtitle {
font-size: 21px;
}
.docs-grid {
grid-template-columns: 1fr;
}
.doc-card {
padding: 32px;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Validator</h1>
<p class="subtitle">Comprehensive documentation for Swift validation framework</p>
</header>
<div class="docs-grid">
<a href="ValidatorCore/documentation/validatorcore/" class="doc-card">
<span class="module-badge">Core Module</span>
<h2>ValidatorCore</h2>
<p>Core validation functionality and rules for Swift applications. Contains base types, protocols, and validator implementations.</p>
<span class="link">View documentation</span>
</a>
<a href="ValidatorUI/documentation/validatorui/" class="doc-card">
<span class="module-badge">UI Module</span>
<h2>ValidatorUI</h2>
<p>UI components and helpers for building validation interfaces. Ready-to-use solutions for SwiftUI and UIKit.</p>
<span class="link">View documentation</span>
</a>
</div>
<footer>
<p>Generated with Swift DocC</p>
</footer>
</div>
</body>
</html>
EOF
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: gh-pages
force_orphan: true