ci: build and publish the documentation to the pages branch
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
eee15eb68e
commit
25895fbb7a
4 changed files with 217 additions and 2 deletions
44
docs/conf.py
44
docs/conf.py
|
|
@ -3,6 +3,8 @@
|
|||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import os
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
|
|
@ -43,6 +45,48 @@ html_theme = 'sphinx_book_theme'
|
|||
html_static_path = []
|
||||
html_show_sphinx = False
|
||||
|
||||
# Le thème publie le source de chaque page dans _sources/ et l'expose derrière
|
||||
# un bouton de téléchargement. Les deux vont ensemble : couper la copie sans
|
||||
# couper le bouton laisserait un lien mort vers un répertoire vide.
|
||||
html_copy_source = False
|
||||
html_show_sourcelink = False
|
||||
|
||||
# Le sélecteur de version est piloté par le workflow de publication : hors CI
|
||||
# la variable est absente, le sélecteur n'apparaît pas, et le build ne dépend
|
||||
# d'aucun réseau.
|
||||
_docs_version = os.environ.get('DOCS_VERSION')
|
||||
|
||||
html_theme_options = {
|
||||
'home_page_in_toc': True,
|
||||
'use_download_button': False,
|
||||
'icon_links': [
|
||||
{
|
||||
'name': 'Dépôt',
|
||||
'url': 'https://git.g3e.fr/syonad/two',
|
||||
'icon': 'fa-solid fa-code-branch',
|
||||
'type': 'fontawesome',
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
if _docs_version:
|
||||
html_theme_options['switcher'] = {
|
||||
# Chemin relatif volontairement : le thème le résout contre la racine
|
||||
# de la version courante, donc toujours dans la même origine que la
|
||||
# page. Une URL absolue ferait échouer la requête en CORS dès que le
|
||||
# site est consulté depuis un autre hôte — un serveur de test local,
|
||||
# par exemple.
|
||||
'json_url': '../switcher.json',
|
||||
'version_match': _docs_version,
|
||||
}
|
||||
# Le thème book vide navbar_start et place tout dans la barre latérale : le
|
||||
# sélecteur doit donc y être inséré explicitement, à côté du logo.
|
||||
html_sidebars = {
|
||||
'**': [
|
||||
'navbar-logo.html',
|
||||
'icon-links.html',
|
||||
'version-switcher.html',
|
||||
'search-button-field.html',
|
||||
'sbt-sidebar-nav.html',
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ disques : le disque de travail et le disque cible ne doivent pas être confondus
|
|||
cd /work
|
||||
|
||||
curl "${os_link}" -O
|
||||
qemu-img convert ./*.qcow2 -O raw ${os_disk}
|
||||
qemu-img convert ./*.qcow2 -O raw "${os_disk}"
|
||||
|
||||
L'image du fournisseur est écrite **en brut** directement sur le disque cible : le qcow2 obtenu
|
||||
côté host contient donc une image disque complète et amorçable, sans backing file.
|
||||
|
|
@ -194,7 +194,7 @@ côté host contient donc une image disque complète et amorçable, sans backing
|
|||
sleep 2
|
||||
|
||||
# La partition racine est la plus grande du disque
|
||||
root_partition=$(fdisk -lo device,size /dev/sda | grep -E '^\/dev\/' | tr -s ' ' \
|
||||
root_partition=$(fdisk -lo device,size "${os_disk}" | grep -E '^/dev/' | tr -s ' ' \
|
||||
| sort -rhk2 | head -n1 | cut -d ' ' -f1)
|
||||
|
||||
mount -o nouuid $root_partition /mnt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue