Skip to content

Commit c95fc7a

Browse files
Merge pull request #1 from ThePhoenixAgency/copilot/fix-f0bbb880-1dd3-4f8e-ac88-cf0139c80ffc
Set up GitHub Pages for free domain hosting (github.io)
2 parents 144f84a + 27a0efd commit c95fc7a

File tree

8 files changed

+640
-0
lines changed

8 files changed

+640
-0
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
# Build job
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v4
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
# Upload docs directory
36+
path: './docs'
37+
38+
# Deployment job
39+
deploy:
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ Le projet utilise GitHub Actions pour l'automatisation :
126126

127127
## 📚 Documentation
128128

129+
- **🌐 [Site officiel](https://phoenixguardiantools.github.io/py-stats-toolkit/)** - Hébergé gratuitement sur GitHub Pages
129130
- [Documentation complète](https://py-stats-toolkit.readthedocs.io/)
130131
- [Exemples d'utilisation](https://github.com/PhoenixGuardianTools/py-stats-toolkit/tree/main/examples)
131132
- [Guide de contribution](CONTRIBUTING.md)
133+
- [Guide GitHub Pages](GITHUB_PAGES_GUIDE.md) - Comment avoir un domaine gratuit comme github.io
132134

133135
## 🧪 Tests et Qualité du Code
134136

docs/404.html

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<!DOCTYPE html>
2+
<html lang="fr">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Page non trouvée - Py-Stats-Toolkit</title>
7+
<style>
8+
body {
9+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
10+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
11+
color: white;
12+
margin: 0;
13+
padding: 0;
14+
height: 100vh;
15+
display: flex;
16+
align-items: center;
17+
justify-content: center;
18+
text-align: center;
19+
}
20+
21+
.container {
22+
max-width: 600px;
23+
padding: 2rem;
24+
}
25+
26+
.error-code {
27+
font-size: 8rem;
28+
font-weight: bold;
29+
margin-bottom: 1rem;
30+
opacity: 0.8;
31+
}
32+
33+
h1 {
34+
font-size: 2rem;
35+
margin-bottom: 1rem;
36+
}
37+
38+
p {
39+
font-size: 1.2rem;
40+
margin-bottom: 2rem;
41+
opacity: 0.9;
42+
}
43+
44+
.btn {
45+
display: inline-block;
46+
padding: 12px 24px;
47+
background: rgba(255, 255, 255, 0.2);
48+
color: white;
49+
text-decoration: none;
50+
border-radius: 6px;
51+
border: 2px solid rgba(255, 255, 255, 0.3);
52+
font-weight: 600;
53+
transition: all 0.3s ease;
54+
}
55+
56+
.btn:hover {
57+
background: white;
58+
color: #667eea;
59+
}
60+
</style>
61+
</head>
62+
<body>
63+
<div class="container">
64+
<div class="error-code">404</div>
65+
<h1>Page non trouvée</h1>
66+
<p>Désolé, la page que vous recherchez n'existe pas.</p>
67+
<a href="/py-stats-toolkit/" class="btn">← Retour à l'accueil</a>
68+
</div>
69+
</body>
70+
</html>

docs/CNAME.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This file is not currently used but can be configured later
2+
# for custom domain setup. For now, the site is available at:
3+
# https://phoenixguardiantools.github.io/py-stats-toolkit/

docs/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Documentation Site / GitHub Pages
2+
3+
Ce dossier contient la documentation et le site web statique pour py-stats-toolkit, hébergé gratuitement sur GitHub Pages.
4+
5+
## 🌐 Accès au site
6+
7+
Le site est accessible à l'adresse : **https://phoenixguardiantools.github.io/py-stats-toolkit/**
8+
9+
## 🎯 Objectif
10+
11+
Ce site répond à la question : "Comment avoir un nom de domaine gratuit comme github.io?"
12+
13+
GitHub Pages offre un hébergement gratuit avec un domaine automatique au format :
14+
- `username.github.io` pour les sites utilisateur/organisation
15+
- `username.github.io/repository-name` pour les sites de projet
16+
17+
## 📁 Structure
18+
19+
```
20+
docs/
21+
├── index.html # Page d'accueil principale
22+
├── 404.html # Page d'erreur personnalisée
23+
├── robots.txt # Configuration pour les moteurs de recherche
24+
├── sitemap.xml # Plan du site pour SEO
25+
├── _config.yml # Configuration Jekyll
26+
├── CNAME.example # Exemple pour domaine personnalisé
27+
└── README.md # Cette documentation
28+
```
29+
30+
## 🚀 Déploiement automatique
31+
32+
Le site est déployé automatiquement via GitHub Actions (`.github/workflows/deploy-pages.yml`) à chaque push sur la branche principale.
33+
34+
## 🎨 Fonctionnalités du site
35+
36+
- ✅ Design responsive et moderne
37+
- ✅ Installation et exemples d'utilisation
38+
- ✅ Liens vers PyPI et GitHub
39+
- ✅ SEO optimisé
40+
- ✅ Meta tags Open Graph et Twitter Card
41+
- ✅ Favicon personnalisé
42+
- ✅ Page 404 personnalisée
43+
44+
## 📈 SEO et référencement
45+
46+
- Sitemap XML pour l'indexation
47+
- Robots.txt configuré
48+
- Meta descriptions optimisées
49+
- Structure HTML sémantique
50+
- Schema.org markup
51+
52+
## 💡 Domaine personnalisé (optionnel)
53+
54+
Pour utiliser un domaine personnalisé :
55+
1. Ajouter un fichier `CNAME` avec votre domaine
56+
2. Configurer les DNS chez votre registrar
57+
3. Activer HTTPS dans les paramètres GitHub Pages
58+
59+
## 🔧 Modifications
60+
61+
Pour modifier le site :
62+
1. Éditez les fichiers dans le dossier `docs/`
63+
2. Committez et pushez les changements
64+
3. Le site se met à jour automatiquement

0 commit comments

Comments
 (0)