Skip to content

Commit 79acfe6

Browse files
committed
🔧 Fix GitHub Pages deployment
- Add index.html redirect page - Simplify GitHub Actions workflow - Remove unnecessary environment validation
1 parent 5952562 commit 79acfe6

File tree

2 files changed

+75
-18
lines changed

2 files changed

+75
-18
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,24 @@ name: Build and Deploy Documentation
33
on:
44
push:
55
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
86

97
permissions:
108
contents: read
119
pages: write
1210
id-token: write
1311

14-
concurrency:
15-
group: "pages"
16-
cancel-in-progress: false
17-
1812
jobs:
19-
build:
13+
deploy:
14+
environment:
15+
name: github-pages
16+
url: ${{ steps.deployment.outputs.page_url }}
2017
runs-on: ubuntu-latest
2118

2219
steps:
23-
- uses: actions/checkout@v4
20+
- name: Checkout
21+
uses: actions/checkout@v4
2422

25-
- name: Set up Python
23+
- name: Setup Python
2624
uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.11'
@@ -37,6 +35,8 @@ jobs:
3735
run: |
3836
cd docs
3937
sphinx-build -b html . _build/html
38+
# Copy index.html to root for GitHub Pages
39+
cp index.html _build/html/ || true
4040
4141
- name: Setup Pages
4242
uses: actions/configure-pages@v4
@@ -45,16 +45,7 @@ jobs:
4545
uses: actions/upload-pages-artifact@v3
4646
with:
4747
path: docs/_build/html
48-
49-
deploy:
50-
environment:
51-
name: github-pages
52-
url: ${{ steps.deployment.outputs.page_url }}
53-
runs-on: ubuntu-latest
54-
needs: build
55-
if: github.ref == 'refs/heads/main'
5648

57-
steps:
5849
- name: Deploy to GitHub Pages
5950
id: deployment
6051
uses: actions/deploy-pages@v4

docs/index.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>PyHetznerServer Documentation</title>
7+
<meta http-equiv="refresh" content="0; url=./_build/html/index.html">
8+
<link rel="canonical" href="./_build/html/index.html">
9+
<style>
10+
body {
11+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
12+
display: flex;
13+
justify-content: center;
14+
align-items: center;
15+
height: 100vh;
16+
margin: 0;
17+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
18+
color: white;
19+
text-align: center;
20+
}
21+
.container {
22+
background: rgba(255, 255, 255, 0.1);
23+
padding: 2rem;
24+
border-radius: 10px;
25+
backdrop-filter: blur(10px);
26+
}
27+
.spinner {
28+
border: 3px solid rgba(255, 255, 255, 0.3);
29+
border-top: 3px solid white;
30+
border-radius: 50%;
31+
width: 40px;
32+
height: 40px;
33+
animation: spin 1s linear infinite;
34+
margin: 0 auto 1rem;
35+
}
36+
@keyframes spin {
37+
0% { transform: rotate(0deg); }
38+
100% { transform: rotate(360deg); }
39+
}
40+
a {
41+
color: white;
42+
text-decoration: underline;
43+
}
44+
</style>
45+
</head>
46+
<body>
47+
<div class="container">
48+
<div class="spinner"></div>
49+
<h1>🚀 PyHetznerServer Documentation</h1>
50+
<p>Redirecting to documentation...</p>
51+
<p>If you're not redirected automatically, <a href="./_build/html/index.html">click here</a>.</p>
52+
53+
<div style="margin-top: 2rem; font-size: 0.9rem;">
54+
<p>📚 A modern, type-safe Python library for Hetzner Cloud Server management</p>
55+
<p>⚡ Complete API coverage • 🛡️ Type safety • 🧪 Dry-run mode</p>
56+
</div>
57+
</div>
58+
59+
<script>
60+
// Fallback redirect
61+
setTimeout(() => {
62+
window.location.href = './_build/html/index.html';
63+
}, 2000);
64+
</script>
65+
</body>
66+
</html>

0 commit comments

Comments
 (0)