-
Notifications
You must be signed in to change notification settings - Fork 991
314 lines (272 loc) · 10.3 KB
/
publish-site.yaml
File metadata and controls
314 lines (272 loc) · 10.3 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
name: Publish Documentation Site
on:
schedule:
# Run at 5 AM UTC every day, after other workflows
- cron: '0 5 * * *'
# Allow manual triggers for testing
workflow_dispatch:
# Sets permissions for GitHub Pages deployment
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: pages
cancel-in-progress: false
jobs:
# Generate coverage reports
coverage:
name: Generate Coverage Reports
uses: ./.github/workflows/coverage-nightly.yaml
# Generate Python API documentation
python-docs:
name: Generate Python API Documentation
uses: ./.github/workflows/python-docs-nightly.yaml
# Generate general documentation
docs:
name: Generate Project Documentation
uses: ./.github/workflows/docs-nightly.yaml
# Combine all documentation and deploy to GitHub Pages
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-22.04
needs: [coverage, python-docs, docs]
if: always() # Run even if some jobs fail
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download coverage artifact
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: coverage-html-report
path: site-staging/coverage
- name: Download Python docs artifact
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: python-api-docs
path: site-staging/python
- name: Download project docs artifact
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: project-docs
path: site-staging/docs
- name: Create site index
run: |
cat > site-staging/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>Core Lightning Documentation Hub</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
line-height: 1.6;
color: #24292e;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.container {
max-width: 1000px;
width: 100%;
background: white;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 60px 40px;
text-align: center;
}
.header h1 {
font-size: 2.5em;
margin-bottom: 10px;
font-weight: 600;
}
.header p {
font-size: 1.2em;
opacity: 0.9;
}
.content {
padding: 40px;
}
.intro {
text-align: center;
margin-bottom: 40px;
color: #586069;
}
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 24px;
margin-top: 30px;
}
.card {
background: #f6f8fa;
border: 2px solid #e1e4e8;
border-radius: 8px;
padding: 30px;
transition: all 0.3s ease;
text-decoration: none;
color: inherit;
display: block;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0,0,0,0.15);
border-color: #667eea;
}
.card-icon {
font-size: 2.5em;
margin-bottom: 15px;
}
.card h2 {
font-size: 1.4em;
margin-bottom: 12px;
color: #24292e;
}
.card p {
color: #586069;
font-size: 0.95em;
line-height: 1.5;
}
.footer {
text-align: center;
padding: 30px;
color: #586069;
font-size: 0.9em;
border-top: 1px solid #e1e4e8;
}
.footer a {
color: #667eea;
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
}
.timestamp {
margin-top: 15px;
font-size: 0.85em;
opacity: 0.7;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>⚡ Core Lightning</h1>
<p>Documentation Hub</p>
</div>
<div class="content">
<div class="intro">
<p>Welcome to the Core Lightning documentation portal. Choose a category below to explore.</p>
</div>
<div class="cards">
<a href="docs/" class="card">
<div class="card-icon">📖</div>
<h2>Documentation</h2>
<p>Project documentation, guides, and reference materials for Core Lightning.</p>
</a>
<a href="python/" class="card">
<div class="card-icon">🐍</div>
<h2>Python API Reference</h2>
<p>Complete API documentation for pyln.client, pyln.proto, and other Python packages.</p>
</a>
<a href="coverage/" class="card">
<div class="card-icon">📊</div>
<h2>Code Coverage</h2>
<p>Test coverage reports showing which parts of the codebase are tested.</p>
</a>
</div>
</div>
<div class="footer">
<p>
<a href="https://github.com/ElementsProject/lightning">View on GitHub</a> •
<a href="https://github.com/ElementsProject/lightning/issues">Report Issue</a>
</p>
<p class="timestamp">Last updated: TIMESTAMP</p>
</div>
</div>
</body>
</html>
EOF
# Update timestamp
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M UTC")
sed -i "s/TIMESTAMP/$TIMESTAMP/" site-staging/index.html
- name: Add .nojekyll to prevent Jekyll processing
run: |
touch site-staging/.nojekyll
- name: Create 404 page
run: |
cat > site-staging/404.html <<'EOF'
<!DOCTYPE html>
<html>
<head>
<title>404 - Page Not Found</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
margin: 0;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
text-align: center;
}
.container { max-width: 600px; padding: 40px; }
h1 { font-size: 6em; margin: 0; }
p { font-size: 1.2em; margin: 20px 0; }
a { color: white; text-decoration: underline; }
</style>
</head>
<body>
<div class="container">
<h1>404</h1>
<p>Page not found</p>
<p><a href="/">← Return to documentation hub</a></p>
</div>
</body>
</html>
EOF
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: site-staging
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Add summary
run: |
echo "## 🚀 Documentation Site Deployed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "The complete documentation site has been deployed to GitHub Pages." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Included Sections:" >> $GITHUB_STEP_SUMMARY
echo "- 📖 Project Documentation" >> $GITHUB_STEP_SUMMARY
echo "- 🐍 Python API Reference" >> $GITHUB_STEP_SUMMARY
echo "- 📊 Code Coverage Reports" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "🔗 **Site URL:** ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY