@hgdc/docs 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs.schema.json +21 -0
- package/package.json +3 -1
- package/src/build/auto-import.ts +5 -24
- package/src/build/content.ts +82 -0
- package/src/build/markdown.ts +10 -5
- package/src/components/Accordion.astro +3 -1
- package/src/components/Callout.astro +31 -0
- package/src/components/Card.astro +3 -1
- package/src/components/Check.astro +2 -3
- package/src/components/CodeGroup.astro +9 -1
- package/src/components/Danger.astro +2 -3
- package/src/components/Info.astro +2 -3
- package/src/components/Note.astro +2 -3
- package/src/components/Tip.astro +2 -3
- package/src/components/Warning.astro +2 -3
- package/src/core/components.ts +166 -0
- package/src/core/config.ts +42 -0
- package/src/core/feedback-api.ts +27 -0
- package/src/core/theme.ts +6 -3
- package/src/core/validate.ts +276 -0
- package/src/integration.ts +102 -30
- package/src/overrides/Assistant.astro +17 -39
- package/src/overrides/Footer.astro +107 -0
- package/src/overrides/Head.astro +14 -14
- package/src/overrides/Header.astro +92 -0
- package/src/overrides/Icon.astro +65 -0
- package/src/overrides/PageFrame.astro +55 -8
- package/src/overrides/PageSidebar.astro +7 -0
- package/src/overrides/PageTitle.astro +126 -95
- package/src/overrides/Search.astro +54 -0
- package/src/overrides/Sidebar.astro +105 -60
- package/src/overrides/SidebarList.astro +52 -0
- package/src/overrides/SiteFooter.astro +51 -0
- package/src/overrides/ThemeProvider.astro +23 -0
- package/src/overrides/ThemeToggle.astro +90 -0
- package/src/overrides/TwoColumnContent.astro +45 -0
- package/src/overrides/sections.ts +29 -0
- package/src/styles/theme.css +2137 -511
- package/src/widget/client.ts +51 -19
- package/src/widget/code.ts +218 -0
- package/src/widget/excerpt.ts +5 -0
- package/src/widget/search.ts +222 -0
- package/template/.astro/collections/docs.schema.json +3 -0
- package/template/.astro/content-modules.mjs +35 -15
- package/template/.astro/data-store.json +1 -0
- package/template/.astro/settings.json +5 -0
- package/template/.build/.well-known/llms.txt +51 -34
- package/template/.build/404.html +16 -42
- package/template/.build/_astro/Assistant.astro_astro_type_script_index_0_lang.C1pz7yK1.js +4 -0
- package/template/.build/_astro/CodeGroup.astro_astro_type_script_index_0_lang.-eM8maAX.js +1 -0
- package/template/.build/_astro/Footer.astro_astro_type_script_index_0_lang.DzCnn3OT.js +1 -0
- package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js +1 -0
- package/template/.build/_astro/code.smqv0zhe.js +9 -0
- package/template/.build/_astro/common.Dx3aBIS0.css +3 -0
- package/template/.build/_astro/{ec.8nqtp.css → ec.t9qpe.css} +1 -1
- package/template/.build/_astro/logo.BPu921Tp.svg +1 -0
- package/template/.build/_hgdc/corpus.json +1 -1
- package/template/.build/concepts/confidentialite/index.html +50 -0
- package/template/.build/concepts/confidentialite.md +38 -0
- package/template/.build/concepts/deploiements/index.html +106 -0
- package/template/.build/concepts/deploiements.md +70 -0
- package/template/.build/concepts/organisations-et-roles/index.html +83 -0
- package/template/.build/concepts/organisations-et-roles.md +39 -0
- package/template/.build/concepts/preversion/index.html +49 -0
- package/template/.build/concepts/preversion.md +52 -0
- package/template/.build/concepts/secrets-et-coffre/index.html +70 -0
- package/template/.build/concepts/secrets-et-coffre.md +54 -0
- package/template/.build/demarrer/depuis-github/index.html +34 -0
- package/template/.build/demarrer/depuis-github.md +68 -0
- package/template/.build/demarrer/premier-site/index.html +28 -0
- package/template/.build/demarrer/premier-site.md +94 -0
- package/template/.build/guides/brancher-un-domaine/index.html +91 -0
- package/template/.build/guides/brancher-un-domaine.md +81 -0
- package/template/.build/guides/cle-d-api/index.html +62 -0
- package/template/.build/guides/cle-d-api.md +78 -0
- package/template/.build/guides/depannage/index.html +64 -0
- package/template/.build/guides/depannage.md +69 -0
- package/template/.build/guides/deployer-depuis-github/index.html +45 -0
- package/template/.build/guides/deployer-depuis-github.md +70 -0
- package/template/.build/guides/deployer-un-framework/index.html +81 -0
- package/template/.build/guides/deployer-un-framework.md +74 -0
- package/template/.build/guides/github-actions-sans-application/index.html +53 -0
- package/template/.build/guides/github-actions-sans-application.md +95 -0
- package/template/.build/guides/inviter-une-personne/index.html +28 -0
- package/template/.build/guides/inviter-une-personne.md +38 -0
- package/template/.build/guides/lire-les-logs/index.html +37 -0
- package/template/.build/guides/lire-les-logs.md +48 -0
- package/template/.build/guides/migrer-depuis-vercel/index.html +25 -0
- package/template/.build/guides/migrer-depuis-vercel.md +51 -0
- package/template/.build/guides/monorepo/index.html +40 -0
- package/template/.build/guides/monorepo.md +42 -0
- package/template/.build/guides/revenir-en-arriere/index.html +39 -0
- package/template/.build/guides/revenir-en-arriere.md +50 -0
- package/template/.build/guides/site-statique/index.html +41 -0
- package/template/.build/guides/site-statique.md +59 -0
- package/template/.build/guides/synchroniser-doppler/index.html +46 -0
- package/template/.build/guides/synchroniser-doppler.md +63 -0
- package/template/.build/guides/variables-d-environnement/index.html +73 -0
- package/template/.build/guides/variables-d-environnement.md +92 -0
- package/template/.build/images/famille/account.svg +1 -0
- package/template/.build/images/famille/analytics.svg +1 -0
- package/template/.build/images/famille/docs.svg +1 -0
- package/template/.build/images/famille/host.svg +1 -0
- package/template/.build/images/famille/mail.svg +1 -0
- package/template/.build/images/famille/portal.svg +1 -0
- package/template/.build/images/famille/status.svg +1 -0
- package/template/.build/images/logo.svg +1 -0
- package/template/.build/index.html +30 -86
- package/template/.build/index.md +59 -21
- package/template/.build/llms-full.txt +2330 -518
- package/template/.build/llms.txt +51 -34
- package/template/.build/pagefind/fragment/fr-ch_16987e2.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_2b4c97b.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_3294a5c.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_34858c9.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_39ddba1.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_4ab1899.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_4d3a52a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_506c187.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_5aa255a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_6841c7d.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_6dc7a2d.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_847edff.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_8745af7.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_8aac5e6.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_916b233.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_9fd014a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a0808f8.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a4e1f69.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a80a53d.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_a9e725b.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_ac3f64c.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_af292f1.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_af3e716.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_b0689a4.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_baed996.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_c89e27a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_cd6ca13.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_d09af09.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_d4bcea8.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_dc2a134.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_ded7ddc.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e2528cb.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e3cbb4e.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e7902d9.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_f48ca47.pf_fragment +0 -0
- package/template/.build/pagefind/index/fr-ch_8a5f905.pf_index +0 -0
- package/template/.build/pagefind/index/fr-ch_fbd9c96.pf_index +0 -0
- package/template/.build/pagefind/pagefind-entry.json +1 -1
- package/template/.build/pagefind/pagefind.fr-ch_211aacbfa7f0e.pf_meta +0 -0
- package/template/.build/reference/api/deploiements/index.html +326 -0
- package/template/.build/reference/api/deploiements.md +170 -0
- package/template/.build/reference/api/erreurs/index.html +102 -0
- package/template/.build/reference/api/erreurs.md +50 -0
- package/template/.build/reference/api/fichiers/index.html +82 -0
- package/template/.build/reference/api/fichiers.md +62 -0
- package/template/.build/reference/api/introduction/index.html +126 -0
- package/template/.build/reference/api/introduction.md +84 -0
- package/template/.build/reference/api/projets/index.html +184 -0
- package/template/.build/reference/api/projets.md +102 -0
- package/template/.build/reference/api/utilisateur/index.html +96 -0
- package/template/.build/reference/api/utilisateur.md +89 -0
- package/template/.build/reference/api/variables/index.html +75 -0
- package/template/.build/reference/api/variables.md +58 -0
- package/template/.build/reference/cli/index.html +165 -82
- package/template/.build/reference/cli.md +159 -23
- package/template/.build/reference/compatibilite/index.html +196 -0
- package/template/.build/reference/compatibilite.md +64 -0
- package/template/.build/reference/domaines/index.html +171 -0
- package/template/.build/reference/domaines.md +76 -0
- package/template/.build/reference/limites/index.html +159 -0
- package/template/.build/reference/limites.md +56 -0
- package/template/.build/reference/variables/index.html +164 -0
- package/template/.build/reference/variables.md +63 -0
- package/template/.build/reference/vercel-json/index.html +65 -0
- package/template/.build/reference/vercel-json.md +51 -0
- package/template/node_modules/.vite/deps/_metadata.json +8 -8
- package/template/src/content.config.ts +8 -2
- package/template/.build/_astro/Assistant.astro_astro_type_script_index_0_lang.DWgmlr85.js +0 -4
- package/template/.build/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.C3fM4Kra.js +0 -1
- package/template/.build/_astro/Search.astro_astro_type_script_index_0_lang.Cn3-p701.js +0 -1
- package/template/.build/_astro/TableOfContents.astro_astro_type_script_index_0_lang.BpJaGz7G.js +0 -1
- package/template/.build/_astro/common.C-MpX45O.css +0 -3
- package/template/.build/_astro/logo-clair.BqNh6JNi.svg +0 -1
- package/template/.build/_astro/logo-sombre.BkgsFXxh.svg +0 -1
- package/template/.build/_astro/starlight-toc.D4UDIxQL.js +0 -1
- package/template/.build/_astro/ui-core.CrG20ya_.js +0 -2
- package/template/.build/demarrer/premiere-doc/index.html +0 -84
- package/template/.build/demarrer/premiere-doc.md +0 -65
- package/template/.build/explications/donnees/index.html +0 -114
- package/template/.build/explications/donnees.md +0 -28
- package/template/.build/explications/fonctionnement/index.html +0 -93
- package/template/.build/explications/fonctionnement.md +0 -32
- package/template/.build/guides/agents/index.html +0 -118
- package/template/.build/guides/agents.md +0 -54
- package/template/.build/guides/assistant/index.html +0 -119
- package/template/.build/guides/assistant.md +0 -46
- package/template/.build/guides/composants/index.html +0 -97
- package/template/.build/guides/composants.md +0 -101
- package/template/.build/guides/ecrire/index.html +0 -116
- package/template/.build/guides/ecrire.md +0 -63
- package/template/.build/guides/navigation/index.html +0 -90
- package/template/.build/guides/navigation.md +0 -63
- package/template/.build/guides/publier/index.html +0 -95
- package/template/.build/guides/publier.md +0 -65
- package/template/.build/guides/theme/index.html +0 -87
- package/template/.build/guides/theme.md +0 -33
- package/template/.build/images/favicon.svg +0 -1
- package/template/.build/images/logo-clair.svg +0 -1
- package/template/.build/images/logo-sombre.svg +0 -1
- package/template/.build/pagefind/fragment/fr-ch_2a431a9.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_456586a.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_4f8575c.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_68e734b.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_72b91f4.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_8f256dd.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_95a15cc.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_aa80c55.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_ab79738.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_cfa4336.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_dab8f5e.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_de60b43.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e02aa49.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e254a54.pf_fragment +0 -0
- package/template/.build/pagefind/fragment/fr-ch_e2c46e3.pf_fragment +0 -0
- package/template/.build/pagefind/index/fr-ch_a71411b.pf_index +0 -0
- package/template/.build/pagefind/pagefind.fr-ch_2f3ea8fccf961.pf_meta +0 -0
- package/template/.build/reference/api-assistant/index.html +0 -161
- package/template/.build/reference/api-assistant.md +0 -70
- package/template/.build/reference/docs-json/index.html +0 -192
- package/template/.build/reference/docs-json.md +0 -43
- package/template/.build/reference/mcp/index.html +0 -151
- package/template/.build/reference/mcp.md +0 -49
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!DOCTYPE html><html lang="fr-CH" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-mxbotnn6"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Lire les logs | Host</title><style>:root{--sl-color-accent-low:#172544;--sl-color-accent:#4b8eff;--sl-color-accent-high:#87d3ff;--hgdc-on-accent:#000000;}:root:not([data-hd-theme="dark"]){--sl-color-accent-low:#dcf1ff;--sl-color-accent:#194ff7;--sl-color-accent-high:#0400bf;--hgdc-on-accent:#ffffff;}</style><link rel="shortcut icon" href="/docs/images/logo.svg" type="image/svg+xml"/><meta name="generator" content="Astro v7.3.8"/><meta name="generator" content="Starlight v0.42.6"/><meta property="og:title" content="Lire les logs"/><meta property="og:type" content="article"/><meta property="og:locale" content="fr-CH"/><meta property="og:description" content="Suis les requêtes servies par ton site, puis la sortie de tes builds, pour trouver la cause d'une erreur."/><meta property="og:site_name" content="Host"/><meta name="twitter:card" content="summary_large_image"/><meta name="description" content="Suis les requêtes servies par ton site, puis la sortie de tes builds, pour trouver la cause d'une erreur."/><link rel="alternate" type="text/markdown" href="/docs/guides/lire-les-logs.md"><link rel="describedby" type="text/markdown" href="/docs/llms.txt"><script>
|
|
2
|
+
;(() => {
|
|
3
|
+
let stored = null
|
|
4
|
+
try {
|
|
5
|
+
stored = localStorage.getItem("starlight-theme")
|
|
6
|
+
} catch {}
|
|
7
|
+
const dark =
|
|
8
|
+
stored === "dark" || (stored === "auto" && matchMedia("(prefers-color-scheme: dark)").matches)
|
|
9
|
+
const theme = dark ? "dark" : "light"
|
|
10
|
+
document.documentElement.dataset.theme = theme
|
|
11
|
+
document.documentElement.dataset.hdTheme = theme
|
|
12
|
+
window.StarlightThemeProvider = { updatePickers() {} }
|
|
13
|
+
})()
|
|
14
|
+
</script><link rel="stylesheet" href="/docs/_astro/print.ehPL0gv-.css" media="print"><link rel="stylesheet" href="/docs/_astro/common.Dx3aBIS0.css"><style>@layer starlight.components{svg:where(.astro-lgqmsw3b){color:var(--sl-icon-color);font-size:var(--sl-icon-size,1em);width:1em;height:1em;overflow:visible}}
|
|
15
|
+
@layer starlight.components{starlight-tabs:where(.astro-a5blunwz){display:block}.tablist-wrapper:where(.astro-a5blunwz){overflow-x:auto}:where(.astro-a5blunwz)[role=tablist]{border-bottom:2px solid var(--sl-color-gray-5);padding:0;list-style:none;display:flex}.tab:where(.astro-a5blunwz){display:flex}.tab:where(.astro-a5blunwz)>:where(.astro-a5blunwz)[role=tab]{--sl-tab-color-border:var(--sl-color-gray-5);line-height:var(--sl-line-height-headings);box-shadow:0 2px 0 var(--sl-tab-color-border);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial;align-items:center;gap:.5rem;padding:.275rem 1.25rem;text-decoration:none;display:flex}.tab:where(.astro-a5blunwz) :where(.astro-a5blunwz)[role=tab][aria-selected=true]{--sl-tab-color-border:var(--sl-color-text-accent);color:var(--sl-color-white);font-weight:600}.tablist-wrapper:where(.astro-a5blunwz)~[role=tabpanel]{margin-top:1rem}}
|
|
16
|
+
</style><script type="module" src="/docs/_astro/page.cNngjUgL.js"></script></head><body class="astro-mxbotnn6"><a class="sl-skip-link astro-k4td3kwj" href="#_top">Aller au contenu</a><div class="hd-page"><header class="hd-topbar"><div class="hd-header"><div class="hd-header__start"><button type="button" class="hd-icon-button hd-menu-button" popovertarget="starlight__sidebar" aria-label="Menu de la documentation" aria-controls="starlight__sidebar"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M4 12h16M4 17h10"></path></svg></button><a class="hd-brand" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="24" height="24"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="24" height="24"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-header__end"><hd-search data-base="/docs" data-assistant><button type="button" class="hd-search-trigger" data-open aria-haspopup="dialog" aria-label="Rechercher (Ctrl K)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><span class="hd-search-trigger__label">Rechercher</span><kbd class="hd-kbd" data-shortcut>Ctrl K</kbd></button><dialog class="hd-palette" aria-label="Rechercher dans la documentation"><div class="hd-palette__box"><div class="hd-palette__field"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><input type="search" data-input placeholder="Rechercher dans la documentation" autocomplete="off" spellcheck="false" role="combobox" aria-expanded="false" aria-controls="hd-palette-results" aria-autocomplete="list"><button type="button" class="hd-kbd hd-kbd--button" data-close>Échap</button></div><div class="hd-palette__results" id="hd-palette-results" role="listbox" aria-label="Résultats" data-results></div><p class="hd-palette__status" data-status role="status">Tape un mot pour chercher dans les pages.</p><footer class="hd-palette__hints" aria-hidden="true"><span><kbd class="hd-kbd">↑</kbd><kbd class="hd-kbd">↓</kbd> Choisir</span><span><kbd class="hd-kbd">↵</kbd> Ouvrir</span><span><kbd class="hd-kbd">Échap</kbd> Fermer</span></footer></div></dialog></hd-search><script type="module" src="/docs/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js"></script><button type="button" class="hd-icon-button" data-hgdc-ask aria-label="Demander à l'assistant" title="Demander à l'assistant (Ctrl I)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg></button><button type="button" class="hd-icon-button hd-theme-button" data-hd-theme-toggle aria-label="Passer au thème sombre"><svg class="hd-icon hd-theme-button__moon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg><svg class="hd-icon hd-theme-button__sun" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><script type="module">var e=`starlight-theme`,t=()=>{try{return localStorage.getItem(e)||`light`}catch{return`light`}},n=()=>matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`,r=t=>{try{localStorage.setItem(e,t)}catch{}let r=t===`auto`?n():t;document.documentElement.dataset.theme=r,document.documentElement.dataset.hdTheme=r,i()},i=()=>{let e=t(),n=document.documentElement.dataset.theme===`dark`;for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.setAttribute(`aria-label`,n?`Passer au thème clair`:`Passer au thème sombre`);for(let t of document.querySelectorAll(`[data-hd-theme]`)){let n=t.dataset.hdTheme===e;t.setAttribute(`aria-checked`,String(n)),t.tabIndex=n?0:-1}};for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.addEventListener(`click`,()=>r(document.documentElement.dataset.theme===`dark`?`light`:`dark`));for(let e of document.querySelectorAll(`.hd-theme-choice`)){let t=[...e.querySelectorAll(`[data-hd-theme]`)];for(let e of t)e.addEventListener(`click`,()=>r(e.dataset.hdTheme));e.addEventListener(`keydown`,e=>{let n=e.key===`ArrowRight`||e.key===`ArrowDown`?1:e.key===`ArrowLeft`||e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let i=t.findIndex(e=>e.getAttribute(`aria-checked`)===`true`),a=t[(i+n+t.length)%t.length];r(a.dataset.hdTheme),a.focus()})}matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{t()===`auto`&&r(`auto`)}),i();</script></div></div></header><nav class="hd-sidebar" aria-label="Navigation de la documentation"><script type="module">for(let e of document.querySelectorAll(`[data-hgdc-version]`))e.addEventListener(`change`,()=>window.location.assign(e.value));var e=document.querySelector(`.sidebar-pane`);if(e){let t=`hd-sidebar-scroll`;try{let n=Number(sessionStorage.getItem(t));n&&(e.scrollTop=n)}catch{}let n=e.querySelector(`[aria-current="page"]`);if(n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();(r.top<t.top||r.bottom>t.bottom)&&n.scrollIntoView({block:`center`})}addEventListener(`pagehide`,()=>{try{sessionStorage.setItem(t,String(e.scrollTop))}catch{}})}</script><hd-sidebar-pane popover="auto" id="starlight__sidebar" class="sidebar-pane"><div class="hd-sidebar__content"><div class="hd-mobile-only hd-sidebar-head"><a class="hd-brand" href="/docs/"><span class="hd-brand__name">Host</span></a><button type="button" class="hd-icon-button" popovertarget="starlight__sidebar" popovertargetaction="hide" aria-label="Fermer le menu"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div><ul class="hd-nav hd-nav--depth-0"><li class="hd-nav__group"><p class="hd-nav__heading">Démarrer</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/" class="hd-nav__link"><span>Accueil</span></a></li><li><a href="/docs/demarrer/premier-site/" class="hd-nav__link"><span>Premier site</span></a></li><li><a href="/docs/demarrer/depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Guides</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/guides/cle-d-api/" class="hd-nav__link"><span>Clés d'API</span></a></li><li><a href="/docs/guides/deployer-depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li><li><a href="/docs/guides/github-actions-sans-application/" class="hd-nav__link"><span>GitHub Actions sans l'app</span></a></li><li><a href="/docs/guides/deployer-un-framework/" class="hd-nav__link"><span>Un framework</span></a></li><li><a href="/docs/guides/site-statique/" class="hd-nav__link"><span>Site statique</span></a></li><li><a href="/docs/guides/monorepo/" class="hd-nav__link"><span>Monorepo</span></a></li><li><a href="/docs/guides/brancher-un-domaine/" class="hd-nav__link"><span>Brancher un domaine</span></a></li><li><a href="/docs/guides/variables-d-environnement/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/guides/synchroniser-doppler/" class="hd-nav__link"><span>Doppler</span></a></li><li><a href="/docs/guides/revenir-en-arriere/" class="hd-nav__link"><span>Revenir en arrière</span></a></li><li><a href="/docs/guides/inviter-une-personne/" class="hd-nav__link"><span>Inviter une personne</span></a></li><li><a href="/docs/guides/lire-les-logs/" class="hd-nav__link" aria-current="page"><span>Lire les logs</span></a></li><li><a href="/docs/guides/migrer-depuis-vercel/" class="hd-nav__link"><span>Migrer depuis Vercel</span></a></li><li><a href="/docs/guides/depannage/" class="hd-nav__link"><span>Dépannage</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Référence</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/reference/cli/" class="hd-nav__link"><span>CLI</span></a></li><li><a href="/docs/reference/variables/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/reference/domaines/" class="hd-nav__link"><span>Domaines</span></a></li><li><a href="/docs/reference/vercel-json/" class="hd-nav__link"><span>vercel.json</span></a></li><li><a href="/docs/reference/compatibilite/" class="hd-nav__link"><span>Compatibilité</span></a></li><li><a href="/docs/reference/limites/" class="hd-nav__link"><span>Limites</span></a></li><li><details class="hd-nav__fold" open><summary class="hd-nav__link"><span>API</span><svg class="hd-icon hd-nav__chevron" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></summary><ul class="hd-nav hd-nav--depth-2"><li><a href="/docs/reference/api/introduction/" class="hd-nav__link"><span>Introduction</span></a></li><li><a href="/docs/reference/api/erreurs/" class="hd-nav__link"><span>Erreurs</span></a></li><li><a href="/docs/reference/api/utilisateur/" class="hd-nav__link"><span>Utilisateur et organisation</span></a></li><li><a href="/docs/reference/api/projets/" class="hd-nav__link"><span>Projets</span></a></li><li><a href="/docs/reference/api/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/reference/api/fichiers/" class="hd-nav__link"><span>Envoyer un fichier</span></a></li><li><a href="/docs/reference/api/variables/" class="hd-nav__link"><span>Variables</span></a></li></ul></details></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Concepts</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/concepts/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/concepts/organisations-et-roles/" class="hd-nav__link"><span>Organisations et rôles</span></a></li><li><a href="/docs/concepts/secrets-et-coffre/" class="hd-nav__link"><span>Secrets et coffre</span></a></li><li><a href="/docs/concepts/preversion/" class="hd-nav__link"><span>Préversion</span></a></li><li><a href="/docs/concepts/confidentialite/" class="hd-nav__link"><span>Sécurité et confidentialité</span></a></li></ul></li></ul><div class="hd-mobile-only hd-sidebar-footer"><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></div></hd-sidebar-pane></nav><div class="hd-main-frame main-frame"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="hd-columns hd-columns--toc"><div class="hd-columns__main main-pane"><main data-pagefind-body class="astro-mxbotnn6" lang="fr-CH" dir="ltr"><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="hd-title not-content"><p class="hd-eyebrow" data-pagefind-meta="section">Guides</p><div class="hd-title__row"><h1 id="_top">Lire les logs</h1><div class="hd-page-actions" data-hgdc-skip data-pagefind-ignore><div class="hd-split"><button type="button" class="hd-split__main" data-hgdc-copy="/docs/guides/lire-les-logs.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span data-label>Copier la page</span></button><details class="hd-menu"><summary class="hd-split__more" aria-label="Autres formats de la page"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg></summary><ul class="hd-menu__list"><li><button type="button" data-hgdc-copy-item><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span><strong>Copier la page</strong><small>En Markdown, pour un LLM</small></span></button></li><li><a href="/docs/guides/lire-les-logs.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm3 9V9l2.5 3L12 9v6m5-6v6m-2-2 2 2 2-2"></path></svg><span><strong>Voir en Markdown</strong><small>La page en texte brut</small></span></a></li><li><a data-hgdc-open="claude" href="https://claude.ai/new" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans Claude</strong><small>Poser une question sur cette page</small></span></a></li><li><a data-hgdc-open="chatgpt" href="https://chatgpt.com/" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans ChatGPT</strong><small>Poser une question sur cette page</small></span></a></li><li><a href="/docs/llms.txt"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Zm0 0v5h5M9 13h6m-6 4h4"></path></svg><span><strong>llms.txt</strong><small>L'index de la doc pour les agents</small></span></a></li></ul></details></div><span class="sr-only" role="status" aria-live="polite" data-hgdc-copy-status></span></div></div><p class="hd-lead">Suis les requêtes servies par ton site, puis la sortie de tes builds, pour trouver la cause d'une erreur.</p></div><script type="module">var e=document.querySelector(`[data-hgdc-copy-status]`),t=document.querySelector(`[data-hgdc-copy]`);async function n(){if(!t)return;let n=t.querySelector(`[data-label]`),r=t=>{n.textContent=t,e&&(e.textContent=t),setTimeout(()=>n.textContent=`Copier la page`,2e3)};try{let e=await fetch(t.dataset.hgdcCopy);if(!e.ok)throw Error(String(e.status));await navigator.clipboard.writeText(await e.text()),r(`Page copiée`)}catch{r(`Copie impossible`)}}if(t?.addEventListener(`click`,()=>void n()),document.querySelector(`[data-hgdc-copy-item]`)?.addEventListener(`click`,()=>{document.querySelector(`.hd-menu`).open=!1,n()}),t){let e=`Lis ${new URL(t.dataset.hgdcCopy,location.href).href} et réponds à mes questions sur cette page.`;for(let t of document.querySelectorAll(`[data-hgdc-open]`))t.href=`${t.dataset.hgdcOpen===`claude`?`https://claude.ai/new`:`https://chatgpt.com/`}?q=${encodeURIComponent(e)}`}for(let e of document.querySelectorAll(`.hd-menu`))document.addEventListener(`click`,t=>{e.open&&!e.contains(t.target)&&(e.open=!1)}),e.addEventListener(`keydown`,t=>{t.key===`Escape`&&e.open&&(t.stopPropagation(),e.open=!1,e.querySelector(`summary`)?.focus())});</script></div></div><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="sl-markdown-content"><p>Les logs répondent à deux questions : qu’est-ce que les visiteurs ont reçu, et qu’est-ce qui s’est passé pendant le build. Ce guide montre où les trouver et comment les filtrer.</p>
|
|
17
|
+
<p><strong>Résultat attendu</strong> : tu identifies la requête ou la ligne de build à l’origine d’un problème.</p>
|
|
18
|
+
<h2 id="les-requêtes-servies">Les requêtes servies</h2>
|
|
19
|
+
<ol class="hgdc-steps"><li class="hgdc-step"><p class="hgdc-step__title">Ouvre l'onglet Logs du projet</p><div class="hgdc-step__body"><p>Les requêtes apparaissent en direct. Pour chacune, tu vois l’heure, le statut HTTP, la méthode, le domaine, le chemin, la durée de traitement et la taille de la réponse.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Isole les erreurs</p><div class="hgdc-step__body"><p>Clique <strong>Erreur</strong> pour ne garder que les réponses <code>5xx</code>. Clique <strong>Alerte</strong> pour les réponses <code>4xx</code>. La recherche lit le chemin et le domaine.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Garde la vue à jour</p><div class="hgdc-step__body"><p><strong>Suivre</strong> garde les dernières requêtes en vue. Sous la liste, un compteur donne le nombre de réponses par classe : 2xx, 3xx, 4xx et 5xx.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Copie ce qui t'intéresse</p><div class="hgdc-step__body"><p><strong>Tout copier</strong> copie toutes les requêtes reçues, une par ligne. L’icône de copie ne copie que les lignes affichées.</p></div></li></ol>
|
|
20
|
+
<p>Les requêtes ne gardent ni adresse IP, ni en-têtes, ni paramètres d’URL (la partie après <code>?</code>). Elles disparaissent après trois jours. Voir <a href="/docs/concepts/confidentialite/">Confidentialité</a>.</p>
|
|
21
|
+
<h2 id="la-sortie-dun-build">La sortie d’un build</h2>
|
|
22
|
+
<p>La page de chaque déploiement affiche la sortie du build : installation, <code>vercel build</code>, puis publication.</p>
|
|
23
|
+
<ul>
|
|
24
|
+
<li>Avec l’intégration GitHub, les lignes arrivent en direct pendant le build.</li>
|
|
25
|
+
<li>Cherche dans les lignes, ou filtre les erreurs et les alertes.</li>
|
|
26
|
+
<li>Ouvre le run GitHub Actions pour la sortie complète, si ton build passe par GitHub.</li>
|
|
27
|
+
<li><strong>Tout copier</strong> copie la sortie entière. L’icône de copie ne copie que les lignes affichées.</li>
|
|
28
|
+
</ul>
|
|
29
|
+
<h2 id="suivre-un-déploiement-depuis-le-terminal">Suivre un déploiement depuis le terminal</h2>
|
|
30
|
+
<p><code>vercel deploy</code> suit la publication jusqu’à la fin, pendant 9 minutes au plus, puis rend la main :</p>
|
|
31
|
+
<div class="expressive-code"><link rel="stylesheet" href="/docs/_astro/ec.t9qpe.css"><script type="module" src="/docs/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">vercel</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0550AE;--1:#79C0FF">--api</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">https://api.host.hgdc.ch</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">deploy</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0550AE;--1:#79C0FF">--prod</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="vercel --api https://api.host.hgdc.ch deploy --prod"><div></div></button></div></figure></div>
|
|
32
|
+
<h2 id="si-ça-ne-marche-pas">Si ça ne marche pas</h2>
|
|
33
|
+
<ul>
|
|
34
|
+
<li>Un build n’a pas de sortie : il est peut-être en file, ou il a été annulé avant de démarrer. Vérifie l’état du déploiement.</li>
|
|
35
|
+
<li>Un problème de page n’apparaît pas dans les logs de requêtes : les requêtes sont gardées trois jours seulement. Reproduis le problème, puis regarde tout de suite.</li>
|
|
36
|
+
<li>Pour une erreur de build, commence par la première ligne d’erreur du filtre <strong>Erreur</strong>, puis remonte la sortie jusqu’à elle. Voir <a href="/docs/guides/depannage/">Dépannage</a>.</li>
|
|
37
|
+
</ul></div><hgdc-feedback class="hgdc-feedback not-content" data-endpoint="https://docs.hgdc.ch/api/v1/feedback" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-pagefind-ignore="true"><div data-step="ask"><p class="hgdc-feedback__question">Cette page t'a aidé ?</p><div class="hgdc-feedback__choices"><button type="button" data-helpful="true"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 10v11M15 5.9 14 10h5.8a2 2 0 0 1 1.9 2.5l-2.3 7A2 2 0 0 1 17.5 21H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h2.8a2 2 0 0 0 1.8-1.1L12 2a3.1 3.1 0 0 1 3 3.9Z"></path></svg>Oui</button><button type="button" data-helpful="false"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 14V3M9 18.1 10 14H4.2a2 2 0 0 1-1.9-2.5l2.3-7A2 2 0 0 1 6.5 3H20a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-2.8a2 2 0 0 0-1.8 1.1L12 22a3.1 3.1 0 0 1-3-3.9Z"></path></svg>Non</button></div></div><form data-step="comment" hidden><label for="hgdc-feedback-comment">Qu'est-ce qui manquait ou pourrait être plus clair ? (facultatif)</label><textarea id="hgdc-feedback-comment" name="comment" rows="3" maxlength="1000"></textarea><div class="hgdc-feedback__choices"><button type="submit">Envoyer</button><button type="button" data-skip>Passer</button></div></form><p data-step="done" class="hgdc-feedback__done" role="status" hidden>Merci, c'est noté.</p></hgdc-feedback><nav class="hd-pagination not-content" aria-label="Pages voisines" data-pagefind-ignore><a class="hd-pagination__link" href="/docs/guides/inviter-une-personne/" rel="prev"><span class="hd-pagination__hint"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m15 6-6 6 6 6"></path></svg>Précédent</span><span class="hd-pagination__title">Inviter une personne</span></a><a class="hd-pagination__link hd-pagination__link--next" href="/docs/guides/migrer-depuis-vercel/" rel="next"><span class="hd-pagination__hint">Suivant<svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></span><span class="hd-pagination__title">Migrer depuis Vercel</span></a></nav><script type="module" src="/docs/_astro/Footer.astro_astro_type_script_index_0_lang.DzCnn3OT.js"></script></div></div></main><form class="hd-askbar" data-askbar data-pagefind-ignore><label class="sr-only" for="hd-askbar-input">Pose une question à l'assistant</label><input id="hd-askbar-input" data-askbar-input type="text" maxlength="1000" placeholder="Pose une question…" autocomplete="off"><kbd class="hd-kbd" data-shortcut aria-hidden="true">Ctrl I</kbd><button type="submit" class="hd-send" aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form></div><aside class="hd-columns__toc" aria-label="Sur cette page"><div class="hd-toc-scroll"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">Sur cette page</h2><ul class="astro-jxyovztp" style="--depth: 0;"><li style="--depth: 0;" class="astro-jxyovztp"><a href="#_top" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Vue d’ensemble</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#les-requêtes-servies" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Les requêtes servies</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#la-sortie-dun-build" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">La sortie d’un build</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#suivre-un-déploiement-depuis-le-terminal" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Suivre un déploiement depuis le terminal</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#si-ça-ne-marche-pas" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Si ça ne marche pas</span></a></li></ul></nav></starlight-toc><script type="module">var e=`_top`,t=class extends HTMLElement{_current=this.querySelector(`a[aria-current="true"]`);minH=parseInt(this.dataset.minH||`2`,10);maxH=parseInt(this.dataset.maxH||`3`,10);tocHeadingSelector=`h1#${e},:where(${[...Array.from({length:1+this.maxH-this.minH}).map((e,t)=>`h${this.minH+t}`)].join()})[id]`;set current(e){e!==this._current&&(this._current&&this._current.removeAttribute(`aria-current`),e.setAttribute(`aria-current`,`true`),this._current=e)}onIdle=e=>(window.requestIdleCallback||(e=>setTimeout(e,1)))(e);constructor(){super(),this.onIdle(()=>this.init())}init=()=>{let t=[...this.querySelectorAll(`a`)],n=e=>e.matches(this.tocHeadingSelector),r=t=>{for(;t;){if(t.matches(`.sl-markdown-content, main > *`))return document.getElementById(e);if(n(t))return t;let r=t.querySelector(this.tocHeadingSelector);if(r)return r;let i=t.previousElementSibling;for(;i?.lastElementChild;)i=i.lastElementChild;t=i??t.parentElement}return null},i=e=>{for(let{isIntersecting:n,target:i}of e){if(!n)continue;let e=r(i);if(!e)continue;let a=t.find(t=>t.hash===`#`+encodeURIComponent(e.id));if(a){this.current=a;break}}},a=document.querySelectorAll([`main :where(${this.tocHeadingSelector})`,`main :where(${this.tocHeadingSelector}, .sl-heading-wrapper) ~ *:not(:has(${this.tocHeadingSelector}))`,`main .sl-markdown-content > *:not(:has(${this.tocHeadingSelector}))`,`main > *:not(:has(${this.tocHeadingSelector}))`].join()),o,s=()=>{o||(o=new IntersectionObserver(i,{rootMargin:this.getRootMargin()}),a.forEach(e=>o.observe(e)))};s();let c;window.addEventListener(`resize`,()=>{o&&=(o.disconnect(),void 0),clearTimeout(c),c=setTimeout(()=>this.onIdle(s),200)})};getRootMargin(){let e=(document.querySelector(`header`)?.getBoundingClientRect().height||0)+(this.querySelector(`summary`)?.getBoundingClientRect().height||0)+32;return`-${e}px 0% ${e+53-document.documentElement.clientHeight}px`}};customElements.define(`starlight-toc`,t);</script></div></aside></div><footer class="hd-site-footer" data-pagefind-ignore><div class="hd-site-footer__row"><a class="hd-brand hd-brand--footer" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-site-footer__row hd-site-footer__row--meta"><p>Ton site en ligne, déployé à chaque modification.</p><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></footer></div><hgdc-assistant data-endpoint="https://docs.hgdc.ch/api/v1/ask" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-name="Host"><section class="hgdc-panel" role="dialog" aria-modal="false" aria-labelledby="hgdc-assistant-title" data-panel inert><div class="hgdc-panel__grip" aria-hidden="true"></div><header class="hgdc-panel__header"><h2 id="hgdc-assistant-title"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg>Assistant</h2><div class="hgdc-panel__tools"><button type="button" class="hd-icon-button" data-reset aria-label="Nouvelle conversation" title="Nouvelle conversation" hidden><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12a8 8 0 1 0 2.3-5.7M4 4v4h4"></path></svg></button><button type="button" class="hd-icon-button" data-close aria-label="Fermer l'assistant" title="Fermer (Échap)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div></header><div class="hgdc-panel__body" data-log aria-live="polite"><div class="hgdc-empty" data-empty><p class="hgdc-empty__title">Pose ta question sur Host.</p><p>Je cherche dans les pages de cette documentation et je cite mes sources. Si la réponse n'y est pas, je te le dis.</p></div></div><form class="hgdc-panel__form" data-form><label class="sr-only" for="hgdc-question">Ta question</label><textarea id="hgdc-question" data-input rows="1" maxlength="1000" placeholder="Pose une question…" required></textarea><button type="submit" class="hd-send" data-send aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form><p class="hgdc-panel__note">Réponses générées par IA (Claude, d'Anthropic), à vérifier. Les questions sont conservées 90 jours pour améliorer cette documentation.</p></section></hgdc-assistant><script type="module" src="/docs/_astro/Assistant.astro_astro_type_script_index_0_lang.C1pz7yK1.js"></script></div><script type="module">var e=class extends HTMLElement{connectedCallback(){let e=matchMedia(`(min-width: 50em)`),t=()=>{e.matches&&this.matches(`:popover-open`)&&this.hidePopover(),this.popover=e.matches?null:`auto`};t(),e.addEventListener(`change`,t),this.addEventListener(`toggle`,e=>{let t=e.newState===`open`;for(let e of document.querySelectorAll(`.hd-main-frame, .hd-askbar`))e.toggleAttribute(`inert`,t);document.documentElement.toggleAttribute(`data-hd-menu`,t)}),this.addEventListener(`click`,e=>{e.target.closest(`a`)&&this.matches(`:popover-open`)&&this.hidePopover()})}};customElements.define(`hd-sidebar-pane`,e);</script></body></html>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Lire les logs
|
|
2
|
+
|
|
3
|
+
Les logs répondent à deux questions : qu’est-ce que les visiteurs ont reçu, et qu’est-ce qui s’est passé pendant le build. Ce guide montre où les trouver et comment les filtrer.
|
|
4
|
+
|
|
5
|
+
**Résultat attendu** : tu identifies la requête ou la ligne de build à l’origine d’un problème.
|
|
6
|
+
|
|
7
|
+
## Les requêtes servies
|
|
8
|
+
|
|
9
|
+
1. **Ouvre l'onglet Logs du projet**
|
|
10
|
+
|
|
11
|
+
Les requêtes apparaissent en direct. Pour chacune, tu vois l’heure, le statut HTTP, la méthode, le domaine, le chemin, la durée de traitement et la taille de la réponse.
|
|
12
|
+
|
|
13
|
+
2. **Isole les erreurs**
|
|
14
|
+
|
|
15
|
+
Clique **Erreur** pour ne garder que les réponses `5xx`. Clique **Alerte** pour les réponses `4xx`. La recherche lit le chemin et le domaine.
|
|
16
|
+
|
|
17
|
+
3. **Garde la vue à jour**
|
|
18
|
+
|
|
19
|
+
**Suivre** garde les dernières requêtes en vue. Sous la liste, un compteur donne le nombre de réponses par classe : 2xx, 3xx, 4xx et 5xx.
|
|
20
|
+
|
|
21
|
+
4. **Copie ce qui t'intéresse**
|
|
22
|
+
|
|
23
|
+
**Tout copier** copie toutes les requêtes reçues, une par ligne. L’icône de copie ne copie que les lignes affichées.
|
|
24
|
+
|
|
25
|
+
Les requêtes ne gardent ni adresse IP, ni en-têtes, ni paramètres d’URL (la partie après `?`). Elles disparaissent après trois jours. Voir [Confidentialité](/docs/concepts/confidentialite/).
|
|
26
|
+
|
|
27
|
+
## La sortie d’un build
|
|
28
|
+
|
|
29
|
+
La page de chaque déploiement affiche la sortie du build : installation, `vercel build`, puis publication.
|
|
30
|
+
|
|
31
|
+
- Avec l’intégration GitHub, les lignes arrivent en direct pendant le build.
|
|
32
|
+
- Cherche dans les lignes, ou filtre les erreurs et les alertes.
|
|
33
|
+
- Ouvre le run GitHub Actions pour la sortie complète, si ton build passe par GitHub.
|
|
34
|
+
- **Tout copier** copie la sortie entière. L’icône de copie ne copie que les lignes affichées.
|
|
35
|
+
|
|
36
|
+
## Suivre un déploiement depuis le terminal
|
|
37
|
+
|
|
38
|
+
`vercel deploy` suit la publication jusqu’à la fin, pendant 9 minutes au plus, puis rend la main :
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
vercel --api https://api.host.hgdc.ch deploy --prod
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Si ça ne marche pas
|
|
45
|
+
|
|
46
|
+
- Un build n’a pas de sortie : il est peut-être en file, ou il a été annulé avant de démarrer. Vérifie l’état du déploiement.
|
|
47
|
+
- Un problème de page n’apparaît pas dans les logs de requêtes : les requêtes sont gardées trois jours seulement. Reproduis le problème, puis regarde tout de suite.
|
|
48
|
+
- Pour une erreur de build, commence par la première ligne d’erreur du filtre **Erreur**, puis remonte la sortie jusqu’à elle. Voir [Dépannage](/docs/guides/depannage/).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html><html lang="fr-CH" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-mxbotnn6"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Migrer un projet depuis Vercel | Host</title><style>:root{--sl-color-accent-low:#172544;--sl-color-accent:#4b8eff;--sl-color-accent-high:#87d3ff;--hgdc-on-accent:#000000;}:root:not([data-hd-theme="dark"]){--sl-color-accent-low:#dcf1ff;--sl-color-accent:#194ff7;--sl-color-accent-high:#0400bf;--hgdc-on-accent:#ffffff;}</style><link rel="shortcut icon" href="/docs/images/logo.svg" type="image/svg+xml"/><meta name="generator" content="Astro v7.3.8"/><meta name="generator" content="Starlight v0.42.6"/><meta property="og:title" content="Migrer un projet depuis Vercel"/><meta property="og:type" content="article"/><meta property="og:locale" content="fr-CH"/><meta property="og:description" content="Déplace un projet de Vercel vers Host sans changer tes outils, avec une bascule DNS sans coupure."/><meta property="og:site_name" content="Host"/><meta name="twitter:card" content="summary_large_image"/><meta name="description" content="Déplace un projet de Vercel vers Host sans changer tes outils, avec une bascule DNS sans coupure."/><link rel="alternate" type="text/markdown" href="/docs/guides/migrer-depuis-vercel.md"><link rel="describedby" type="text/markdown" href="/docs/llms.txt"><script>
|
|
2
|
+
;(() => {
|
|
3
|
+
let stored = null
|
|
4
|
+
try {
|
|
5
|
+
stored = localStorage.getItem("starlight-theme")
|
|
6
|
+
} catch {}
|
|
7
|
+
const dark =
|
|
8
|
+
stored === "dark" || (stored === "auto" && matchMedia("(prefers-color-scheme: dark)").matches)
|
|
9
|
+
const theme = dark ? "dark" : "light"
|
|
10
|
+
document.documentElement.dataset.theme = theme
|
|
11
|
+
document.documentElement.dataset.hdTheme = theme
|
|
12
|
+
window.StarlightThemeProvider = { updatePickers() {} }
|
|
13
|
+
})()
|
|
14
|
+
</script><link rel="stylesheet" href="/docs/_astro/print.ehPL0gv-.css" media="print"><link rel="stylesheet" href="/docs/_astro/common.Dx3aBIS0.css"><style>@layer starlight.components{svg:where(.astro-lgqmsw3b){color:var(--sl-icon-color);font-size:var(--sl-icon-size,1em);width:1em;height:1em;overflow:visible}}
|
|
15
|
+
@layer starlight.components{starlight-tabs:where(.astro-a5blunwz){display:block}.tablist-wrapper:where(.astro-a5blunwz){overflow-x:auto}:where(.astro-a5blunwz)[role=tablist]{border-bottom:2px solid var(--sl-color-gray-5);padding:0;list-style:none;display:flex}.tab:where(.astro-a5blunwz){display:flex}.tab:where(.astro-a5blunwz)>:where(.astro-a5blunwz)[role=tab]{--sl-tab-color-border:var(--sl-color-gray-5);line-height:var(--sl-line-height-headings);box-shadow:0 2px 0 var(--sl-tab-color-border);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial;align-items:center;gap:.5rem;padding:.275rem 1.25rem;text-decoration:none;display:flex}.tab:where(.astro-a5blunwz) :where(.astro-a5blunwz)[role=tab][aria-selected=true]{--sl-tab-color-border:var(--sl-color-text-accent);color:var(--sl-color-white);font-weight:600}.tablist-wrapper:where(.astro-a5blunwz)~[role=tabpanel]{margin-top:1rem}}
|
|
16
|
+
</style><script type="module" src="/docs/_astro/page.cNngjUgL.js"></script></head><body class="astro-mxbotnn6"><a class="sl-skip-link astro-k4td3kwj" href="#_top">Aller au contenu</a><div class="hd-page"><header class="hd-topbar"><div class="hd-header"><div class="hd-header__start"><button type="button" class="hd-icon-button hd-menu-button" popovertarget="starlight__sidebar" aria-label="Menu de la documentation" aria-controls="starlight__sidebar"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M4 12h16M4 17h10"></path></svg></button><a class="hd-brand" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="24" height="24"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="24" height="24"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-header__end"><hd-search data-base="/docs" data-assistant><button type="button" class="hd-search-trigger" data-open aria-haspopup="dialog" aria-label="Rechercher (Ctrl K)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><span class="hd-search-trigger__label">Rechercher</span><kbd class="hd-kbd" data-shortcut>Ctrl K</kbd></button><dialog class="hd-palette" aria-label="Rechercher dans la documentation"><div class="hd-palette__box"><div class="hd-palette__field"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><input type="search" data-input placeholder="Rechercher dans la documentation" autocomplete="off" spellcheck="false" role="combobox" aria-expanded="false" aria-controls="hd-palette-results" aria-autocomplete="list"><button type="button" class="hd-kbd hd-kbd--button" data-close>Échap</button></div><div class="hd-palette__results" id="hd-palette-results" role="listbox" aria-label="Résultats" data-results></div><p class="hd-palette__status" data-status role="status">Tape un mot pour chercher dans les pages.</p><footer class="hd-palette__hints" aria-hidden="true"><span><kbd class="hd-kbd">↑</kbd><kbd class="hd-kbd">↓</kbd> Choisir</span><span><kbd class="hd-kbd">↵</kbd> Ouvrir</span><span><kbd class="hd-kbd">Échap</kbd> Fermer</span></footer></div></dialog></hd-search><script type="module" src="/docs/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js"></script><button type="button" class="hd-icon-button" data-hgdc-ask aria-label="Demander à l'assistant" title="Demander à l'assistant (Ctrl I)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg></button><button type="button" class="hd-icon-button hd-theme-button" data-hd-theme-toggle aria-label="Passer au thème sombre"><svg class="hd-icon hd-theme-button__moon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg><svg class="hd-icon hd-theme-button__sun" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><script type="module">var e=`starlight-theme`,t=()=>{try{return localStorage.getItem(e)||`light`}catch{return`light`}},n=()=>matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`,r=t=>{try{localStorage.setItem(e,t)}catch{}let r=t===`auto`?n():t;document.documentElement.dataset.theme=r,document.documentElement.dataset.hdTheme=r,i()},i=()=>{let e=t(),n=document.documentElement.dataset.theme===`dark`;for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.setAttribute(`aria-label`,n?`Passer au thème clair`:`Passer au thème sombre`);for(let t of document.querySelectorAll(`[data-hd-theme]`)){let n=t.dataset.hdTheme===e;t.setAttribute(`aria-checked`,String(n)),t.tabIndex=n?0:-1}};for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.addEventListener(`click`,()=>r(document.documentElement.dataset.theme===`dark`?`light`:`dark`));for(let e of document.querySelectorAll(`.hd-theme-choice`)){let t=[...e.querySelectorAll(`[data-hd-theme]`)];for(let e of t)e.addEventListener(`click`,()=>r(e.dataset.hdTheme));e.addEventListener(`keydown`,e=>{let n=e.key===`ArrowRight`||e.key===`ArrowDown`?1:e.key===`ArrowLeft`||e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let i=t.findIndex(e=>e.getAttribute(`aria-checked`)===`true`),a=t[(i+n+t.length)%t.length];r(a.dataset.hdTheme),a.focus()})}matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{t()===`auto`&&r(`auto`)}),i();</script></div></div></header><nav class="hd-sidebar" aria-label="Navigation de la documentation"><script type="module">for(let e of document.querySelectorAll(`[data-hgdc-version]`))e.addEventListener(`change`,()=>window.location.assign(e.value));var e=document.querySelector(`.sidebar-pane`);if(e){let t=`hd-sidebar-scroll`;try{let n=Number(sessionStorage.getItem(t));n&&(e.scrollTop=n)}catch{}let n=e.querySelector(`[aria-current="page"]`);if(n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();(r.top<t.top||r.bottom>t.bottom)&&n.scrollIntoView({block:`center`})}addEventListener(`pagehide`,()=>{try{sessionStorage.setItem(t,String(e.scrollTop))}catch{}})}</script><hd-sidebar-pane popover="auto" id="starlight__sidebar" class="sidebar-pane"><div class="hd-sidebar__content"><div class="hd-mobile-only hd-sidebar-head"><a class="hd-brand" href="/docs/"><span class="hd-brand__name">Host</span></a><button type="button" class="hd-icon-button" popovertarget="starlight__sidebar" popovertargetaction="hide" aria-label="Fermer le menu"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div><ul class="hd-nav hd-nav--depth-0"><li class="hd-nav__group"><p class="hd-nav__heading">Démarrer</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/" class="hd-nav__link"><span>Accueil</span></a></li><li><a href="/docs/demarrer/premier-site/" class="hd-nav__link"><span>Premier site</span></a></li><li><a href="/docs/demarrer/depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Guides</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/guides/cle-d-api/" class="hd-nav__link"><span>Clés d'API</span></a></li><li><a href="/docs/guides/deployer-depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li><li><a href="/docs/guides/github-actions-sans-application/" class="hd-nav__link"><span>GitHub Actions sans l'app</span></a></li><li><a href="/docs/guides/deployer-un-framework/" class="hd-nav__link"><span>Un framework</span></a></li><li><a href="/docs/guides/site-statique/" class="hd-nav__link"><span>Site statique</span></a></li><li><a href="/docs/guides/monorepo/" class="hd-nav__link"><span>Monorepo</span></a></li><li><a href="/docs/guides/brancher-un-domaine/" class="hd-nav__link"><span>Brancher un domaine</span></a></li><li><a href="/docs/guides/variables-d-environnement/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/guides/synchroniser-doppler/" class="hd-nav__link"><span>Doppler</span></a></li><li><a href="/docs/guides/revenir-en-arriere/" class="hd-nav__link"><span>Revenir en arrière</span></a></li><li><a href="/docs/guides/inviter-une-personne/" class="hd-nav__link"><span>Inviter une personne</span></a></li><li><a href="/docs/guides/lire-les-logs/" class="hd-nav__link"><span>Lire les logs</span></a></li><li><a href="/docs/guides/migrer-depuis-vercel/" class="hd-nav__link" aria-current="page"><span>Migrer depuis Vercel</span></a></li><li><a href="/docs/guides/depannage/" class="hd-nav__link"><span>Dépannage</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Référence</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/reference/cli/" class="hd-nav__link"><span>CLI</span></a></li><li><a href="/docs/reference/variables/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/reference/domaines/" class="hd-nav__link"><span>Domaines</span></a></li><li><a href="/docs/reference/vercel-json/" class="hd-nav__link"><span>vercel.json</span></a></li><li><a href="/docs/reference/compatibilite/" class="hd-nav__link"><span>Compatibilité</span></a></li><li><a href="/docs/reference/limites/" class="hd-nav__link"><span>Limites</span></a></li><li><details class="hd-nav__fold" open><summary class="hd-nav__link"><span>API</span><svg class="hd-icon hd-nav__chevron" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></summary><ul class="hd-nav hd-nav--depth-2"><li><a href="/docs/reference/api/introduction/" class="hd-nav__link"><span>Introduction</span></a></li><li><a href="/docs/reference/api/erreurs/" class="hd-nav__link"><span>Erreurs</span></a></li><li><a href="/docs/reference/api/utilisateur/" class="hd-nav__link"><span>Utilisateur et organisation</span></a></li><li><a href="/docs/reference/api/projets/" class="hd-nav__link"><span>Projets</span></a></li><li><a href="/docs/reference/api/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/reference/api/fichiers/" class="hd-nav__link"><span>Envoyer un fichier</span></a></li><li><a href="/docs/reference/api/variables/" class="hd-nav__link"><span>Variables</span></a></li></ul></details></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Concepts</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/concepts/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/concepts/organisations-et-roles/" class="hd-nav__link"><span>Organisations et rôles</span></a></li><li><a href="/docs/concepts/secrets-et-coffre/" class="hd-nav__link"><span>Secrets et coffre</span></a></li><li><a href="/docs/concepts/preversion/" class="hd-nav__link"><span>Préversion</span></a></li><li><a href="/docs/concepts/confidentialite/" class="hd-nav__link"><span>Sécurité et confidentialité</span></a></li></ul></li></ul><div class="hd-mobile-only hd-sidebar-footer"><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></div></hd-sidebar-pane></nav><div class="hd-main-frame main-frame"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="hd-columns hd-columns--toc"><div class="hd-columns__main main-pane"><main data-pagefind-body class="astro-mxbotnn6" lang="fr-CH" dir="ltr"><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="hd-title not-content"><p class="hd-eyebrow" data-pagefind-meta="section">Guides</p><div class="hd-title__row"><h1 id="_top">Migrer un projet depuis Vercel</h1><div class="hd-page-actions" data-hgdc-skip data-pagefind-ignore><div class="hd-split"><button type="button" class="hd-split__main" data-hgdc-copy="/docs/guides/migrer-depuis-vercel.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span data-label>Copier la page</span></button><details class="hd-menu"><summary class="hd-split__more" aria-label="Autres formats de la page"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg></summary><ul class="hd-menu__list"><li><button type="button" data-hgdc-copy-item><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span><strong>Copier la page</strong><small>En Markdown, pour un LLM</small></span></button></li><li><a href="/docs/guides/migrer-depuis-vercel.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm3 9V9l2.5 3L12 9v6m5-6v6m-2-2 2 2 2-2"></path></svg><span><strong>Voir en Markdown</strong><small>La page en texte brut</small></span></a></li><li><a data-hgdc-open="claude" href="https://claude.ai/new" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans Claude</strong><small>Poser une question sur cette page</small></span></a></li><li><a data-hgdc-open="chatgpt" href="https://chatgpt.com/" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans ChatGPT</strong><small>Poser une question sur cette page</small></span></a></li><li><a href="/docs/llms.txt"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Zm0 0v5h5M9 13h6m-6 4h4"></path></svg><span><strong>llms.txt</strong><small>L'index de la doc pour les agents</small></span></a></li></ul></details></div><span class="sr-only" role="status" aria-live="polite" data-hgdc-copy-status></span></div></div><p class="hd-lead">Déplace un projet de Vercel vers Host sans changer tes outils, avec une bascule DNS sans coupure.</p></div><script type="module">var e=document.querySelector(`[data-hgdc-copy-status]`),t=document.querySelector(`[data-hgdc-copy]`);async function n(){if(!t)return;let n=t.querySelector(`[data-label]`),r=t=>{n.textContent=t,e&&(e.textContent=t),setTimeout(()=>n.textContent=`Copier la page`,2e3)};try{let e=await fetch(t.dataset.hgdcCopy);if(!e.ok)throw Error(String(e.status));await navigator.clipboard.writeText(await e.text()),r(`Page copiée`)}catch{r(`Copie impossible`)}}if(t?.addEventListener(`click`,()=>void n()),document.querySelector(`[data-hgdc-copy-item]`)?.addEventListener(`click`,()=>{document.querySelector(`.hd-menu`).open=!1,n()}),t){let e=`Lis ${new URL(t.dataset.hgdcCopy,location.href).href} et réponds à mes questions sur cette page.`;for(let t of document.querySelectorAll(`[data-hgdc-open]`))t.href=`${t.dataset.hgdcOpen===`claude`?`https://claude.ai/new`:`https://chatgpt.com/`}?q=${encodeURIComponent(e)}`}for(let e of document.querySelectorAll(`.hd-menu`))document.addEventListener(`click`,t=>{e.open&&!e.contains(t.target)&&(e.open=!1)}),e.addEventListener(`keydown`,t=>{t.key===`Escape`&&e.open&&(t.stopPropagation(),e.open=!1,e.querySelector(`summary`)?.focus())});</script></div></div><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="sl-markdown-content"><p>Host reprend les outils que tu utilises déjà : la CLI Vercel, <code>vercel.json</code> et le format Build Output API. Migrer revient à recréer le projet, reprendre ses variables, puis changer le DNS.</p>
|
|
17
|
+
<p><strong>Résultat attendu</strong> : ton domaine sert le site depuis Host, et le projet Vercel n’envoie plus de déploiement.</p>
|
|
18
|
+
<p><strong>Avant de commencer</strong> : vérifie que ton site n’utilise que des fonctions prises en charge. Les fonctions, le runtime edge, l’ISR et les crons sont en préversion, voir <a href="/docs/reference/compatibilite/">Compatibilité</a>.</p>
|
|
19
|
+
<ol class="hgdc-steps"><li class="hgdc-step"><p class="hgdc-step__title">Crée le projet sur Host</p><div class="hgdc-step__body"><p>Importe le dépôt depuis GitHub, voir <a href="/docs/guides/deployer-depuis-github/">Déployer depuis GitHub</a>. Ou lance <code>vercel deploy</code> depuis le dossier du projet avec une clé Host.</p><p>Supprime d’abord le dossier <code>.vercel</code> s’il existe : il pointe vers le projet Vercel.</p><div class="expressive-code"><link rel="stylesheet" href="/docs/_astro/ec.t9qpe.css"><script type="module" src="/docs/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">rm</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0550AE;--1:#79C0FF">-rf</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">.vercel</span></div></div><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">vercel</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0550AE;--1:#79C0FF">--api</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">https://api.host.hgdc.ch</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">deploy</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="rm -rf .vercelvercel --api https://api.host.hgdc.ch deploy"><div></div></button></div></figure></div><p><strong>Vérification</strong> : un déploiement de preview est <strong>Prêt</strong>.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Reprends les variables</p><div class="hgdc-step__body"><p>Sur Vercel, <code>vercel env pull .env.production --environment=production</code> écrit les variables lisibles dans un fichier.</p><p>Colle le contenu de ce fichier dans <strong>Ajouter</strong>, dans l’onglet <strong>Variables d’environnement</strong> de Host, en choisissant l’environnement Production. Les variables marquées « Sensitive » sur Vercel ne se relisent pas : saisis-les à nouveau.</p><p><strong>Vérification</strong> : le nombre de variables correspond à celui de Vercel.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Vérifie la preview</p><div class="hgdc-step__body"><p>Ouvre l’adresse du déploiement et parcours le site : pages, redirections, page 404 et ressources.</p><p><strong>Vérification</strong> : aucune page ne répond <code>404</code> ou <code>501</code> de façon inattendue.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Ajoute le domaine et change le DNS</p><div class="hgdc-step__body"><p>Ajoute le domaine au projet, pose le TXT de propriété, puis remplace les enregistrements qui pointaient vers Vercel par le CNAME ou le A indiqué. Le détail est dans <a href="/docs/guides/brancher-un-domaine/">Brancher un domaine</a>.</p></div></li><li class="hgdc-step"><p class="hgdc-step__title">Retire le projet de Vercel</p><div class="hgdc-step__body"><p>Une fois le trafic arrivé et le certificat émis, débranche le dépôt côté Vercel. Tu évites ainsi deux déploiements à chaque push.</p></div></li></ol>
|
|
20
|
+
<aside class="hd-callout" data-tone="tip" aria-label="Astuce"><svg class="hd-icon hd-callout__icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18h6m-5 3h4M12 3a6 6 0 0 0-3.6 10.8c.5.4.6.8.6 1.2v.5h6V15c0-.4.2-.8.6-1.2A6 6 0 0 0 12 3Z"></path></svg><div class="hd-callout__body"><p>Pose d’abord le TXT : il ne change rien au trafic. Ne change le CNAME ou le A que quand le domaine est prêt côté Host. Baisse le TTL de l’enregistrement quelques heures avant la bascule, pour revenir vite en arrière si besoin.</p></div></aside>
|
|
21
|
+
<h2 id="si-ça-ne-marche-pas">Si ça ne marche pas</h2>
|
|
22
|
+
<ul>
|
|
23
|
+
<li>La preview affiche une page <code>501</code> : une fonction n’est pas encore ouverte à ton organisation. Voir <a href="/docs/concepts/preversion/">Préversion</a>.</li>
|
|
24
|
+
<li>Le site répond encore depuis Vercel : le DNS n’est pas propagé, ou un ancien enregistrement subsiste. Voir <a href="/docs/guides/depannage/#mon-domaine-reste-en-attente">Dépannage</a>.</li>
|
|
25
|
+
</ul></div><hgdc-feedback class="hgdc-feedback not-content" data-endpoint="https://docs.hgdc.ch/api/v1/feedback" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-pagefind-ignore="true"><div data-step="ask"><p class="hgdc-feedback__question">Cette page t'a aidé ?</p><div class="hgdc-feedback__choices"><button type="button" data-helpful="true"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 10v11M15 5.9 14 10h5.8a2 2 0 0 1 1.9 2.5l-2.3 7A2 2 0 0 1 17.5 21H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h2.8a2 2 0 0 0 1.8-1.1L12 2a3.1 3.1 0 0 1 3 3.9Z"></path></svg>Oui</button><button type="button" data-helpful="false"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 14V3M9 18.1 10 14H4.2a2 2 0 0 1-1.9-2.5l2.3-7A2 2 0 0 1 6.5 3H20a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-2.8a2 2 0 0 0-1.8 1.1L12 22a3.1 3.1 0 0 1-3-3.9Z"></path></svg>Non</button></div></div><form data-step="comment" hidden><label for="hgdc-feedback-comment">Qu'est-ce qui manquait ou pourrait être plus clair ? (facultatif)</label><textarea id="hgdc-feedback-comment" name="comment" rows="3" maxlength="1000"></textarea><div class="hgdc-feedback__choices"><button type="submit">Envoyer</button><button type="button" data-skip>Passer</button></div></form><p data-step="done" class="hgdc-feedback__done" role="status" hidden>Merci, c'est noté.</p></hgdc-feedback><nav class="hd-pagination not-content" aria-label="Pages voisines" data-pagefind-ignore><a class="hd-pagination__link" href="/docs/guides/lire-les-logs/" rel="prev"><span class="hd-pagination__hint"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m15 6-6 6 6 6"></path></svg>Précédent</span><span class="hd-pagination__title">Lire les logs</span></a><a class="hd-pagination__link hd-pagination__link--next" href="/docs/guides/depannage/" rel="next"><span class="hd-pagination__hint">Suivant<svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></span><span class="hd-pagination__title">Dépannage</span></a></nav><script type="module" src="/docs/_astro/Footer.astro_astro_type_script_index_0_lang.DzCnn3OT.js"></script></div></div></main><form class="hd-askbar" data-askbar data-pagefind-ignore><label class="sr-only" for="hd-askbar-input">Pose une question à l'assistant</label><input id="hd-askbar-input" data-askbar-input type="text" maxlength="1000" placeholder="Pose une question…" autocomplete="off"><kbd class="hd-kbd" data-shortcut aria-hidden="true">Ctrl I</kbd><button type="submit" class="hd-send" aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form></div><aside class="hd-columns__toc" aria-label="Sur cette page"><div class="hd-toc-scroll"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">Sur cette page</h2><ul class="astro-jxyovztp" style="--depth: 0;"><li style="--depth: 0;" class="astro-jxyovztp"><a href="#_top" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Vue d’ensemble</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#si-ça-ne-marche-pas" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Si ça ne marche pas</span></a></li></ul></nav></starlight-toc><script type="module">var e=`_top`,t=class extends HTMLElement{_current=this.querySelector(`a[aria-current="true"]`);minH=parseInt(this.dataset.minH||`2`,10);maxH=parseInt(this.dataset.maxH||`3`,10);tocHeadingSelector=`h1#${e},:where(${[...Array.from({length:1+this.maxH-this.minH}).map((e,t)=>`h${this.minH+t}`)].join()})[id]`;set current(e){e!==this._current&&(this._current&&this._current.removeAttribute(`aria-current`),e.setAttribute(`aria-current`,`true`),this._current=e)}onIdle=e=>(window.requestIdleCallback||(e=>setTimeout(e,1)))(e);constructor(){super(),this.onIdle(()=>this.init())}init=()=>{let t=[...this.querySelectorAll(`a`)],n=e=>e.matches(this.tocHeadingSelector),r=t=>{for(;t;){if(t.matches(`.sl-markdown-content, main > *`))return document.getElementById(e);if(n(t))return t;let r=t.querySelector(this.tocHeadingSelector);if(r)return r;let i=t.previousElementSibling;for(;i?.lastElementChild;)i=i.lastElementChild;t=i??t.parentElement}return null},i=e=>{for(let{isIntersecting:n,target:i}of e){if(!n)continue;let e=r(i);if(!e)continue;let a=t.find(t=>t.hash===`#`+encodeURIComponent(e.id));if(a){this.current=a;break}}},a=document.querySelectorAll([`main :where(${this.tocHeadingSelector})`,`main :where(${this.tocHeadingSelector}, .sl-heading-wrapper) ~ *:not(:has(${this.tocHeadingSelector}))`,`main .sl-markdown-content > *:not(:has(${this.tocHeadingSelector}))`,`main > *:not(:has(${this.tocHeadingSelector}))`].join()),o,s=()=>{o||(o=new IntersectionObserver(i,{rootMargin:this.getRootMargin()}),a.forEach(e=>o.observe(e)))};s();let c;window.addEventListener(`resize`,()=>{o&&=(o.disconnect(),void 0),clearTimeout(c),c=setTimeout(()=>this.onIdle(s),200)})};getRootMargin(){let e=(document.querySelector(`header`)?.getBoundingClientRect().height||0)+(this.querySelector(`summary`)?.getBoundingClientRect().height||0)+32;return`-${e}px 0% ${e+53-document.documentElement.clientHeight}px`}};customElements.define(`starlight-toc`,t);</script></div></aside></div><footer class="hd-site-footer" data-pagefind-ignore><div class="hd-site-footer__row"><a class="hd-brand hd-brand--footer" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-site-footer__row hd-site-footer__row--meta"><p>Ton site en ligne, déployé à chaque modification.</p><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></footer></div><hgdc-assistant data-endpoint="https://docs.hgdc.ch/api/v1/ask" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-name="Host"><section class="hgdc-panel" role="dialog" aria-modal="false" aria-labelledby="hgdc-assistant-title" data-panel inert><div class="hgdc-panel__grip" aria-hidden="true"></div><header class="hgdc-panel__header"><h2 id="hgdc-assistant-title"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg>Assistant</h2><div class="hgdc-panel__tools"><button type="button" class="hd-icon-button" data-reset aria-label="Nouvelle conversation" title="Nouvelle conversation" hidden><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12a8 8 0 1 0 2.3-5.7M4 4v4h4"></path></svg></button><button type="button" class="hd-icon-button" data-close aria-label="Fermer l'assistant" title="Fermer (Échap)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div></header><div class="hgdc-panel__body" data-log aria-live="polite"><div class="hgdc-empty" data-empty><p class="hgdc-empty__title">Pose ta question sur Host.</p><p>Je cherche dans les pages de cette documentation et je cite mes sources. Si la réponse n'y est pas, je te le dis.</p></div></div><form class="hgdc-panel__form" data-form><label class="sr-only" for="hgdc-question">Ta question</label><textarea id="hgdc-question" data-input rows="1" maxlength="1000" placeholder="Pose une question…" required></textarea><button type="submit" class="hd-send" data-send aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form><p class="hgdc-panel__note">Réponses générées par IA (Claude, d'Anthropic), à vérifier. Les questions sont conservées 90 jours pour améliorer cette documentation.</p></section></hgdc-assistant><script type="module" src="/docs/_astro/Assistant.astro_astro_type_script_index_0_lang.C1pz7yK1.js"></script></div><script type="module">var e=class extends HTMLElement{connectedCallback(){let e=matchMedia(`(min-width: 50em)`),t=()=>{e.matches&&this.matches(`:popover-open`)&&this.hidePopover(),this.popover=e.matches?null:`auto`};t(),e.addEventListener(`change`,t),this.addEventListener(`toggle`,e=>{let t=e.newState===`open`;for(let e of document.querySelectorAll(`.hd-main-frame, .hd-askbar`))e.toggleAttribute(`inert`,t);document.documentElement.toggleAttribute(`data-hd-menu`,t)}),this.addEventListener(`click`,e=>{e.target.closest(`a`)&&this.matches(`:popover-open`)&&this.hidePopover()})}};customElements.define(`hd-sidebar-pane`,e);</script></body></html>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Migrer un projet depuis Vercel
|
|
2
|
+
|
|
3
|
+
Host reprend les outils que tu utilises déjà : la CLI Vercel, `vercel.json` et le format Build Output API. Migrer revient à recréer le projet, reprendre ses variables, puis changer le DNS.
|
|
4
|
+
|
|
5
|
+
**Résultat attendu** : ton domaine sert le site depuis Host, et le projet Vercel n’envoie plus de déploiement.
|
|
6
|
+
|
|
7
|
+
**Avant de commencer** : vérifie que ton site n’utilise que des fonctions prises en charge. Les fonctions, le runtime edge, l’ISR et les crons sont en préversion, voir [Compatibilité](/docs/reference/compatibilite/).
|
|
8
|
+
|
|
9
|
+
1. **Crée le projet sur Host**
|
|
10
|
+
|
|
11
|
+
Importe le dépôt depuis GitHub, voir [Déployer depuis GitHub](/docs/guides/deployer-depuis-github/). Ou lance `vercel deploy` depuis le dossier du projet avec une clé Host.
|
|
12
|
+
|
|
13
|
+
Supprime d’abord le dossier `.vercel` s’il existe : il pointe vers le projet Vercel.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
rm -rf .vercel
|
|
17
|
+
vercel --api https://api.host.hgdc.ch deploy
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Vérification** : un déploiement de preview est **Prêt**.
|
|
21
|
+
|
|
22
|
+
2. **Reprends les variables**
|
|
23
|
+
|
|
24
|
+
Sur Vercel, `vercel env pull .env.production --environment=production` écrit les variables lisibles dans un fichier.
|
|
25
|
+
|
|
26
|
+
Colle le contenu de ce fichier dans **Ajouter**, dans l’onglet **Variables d’environnement** de Host, en choisissant l’environnement Production. Les variables marquées « Sensitive » sur Vercel ne se relisent pas : saisis-les à nouveau.
|
|
27
|
+
|
|
28
|
+
**Vérification** : le nombre de variables correspond à celui de Vercel.
|
|
29
|
+
|
|
30
|
+
3. **Vérifie la preview**
|
|
31
|
+
|
|
32
|
+
Ouvre l’adresse du déploiement et parcours le site : pages, redirections, page 404 et ressources.
|
|
33
|
+
|
|
34
|
+
**Vérification** : aucune page ne répond `404` ou `501` de façon inattendue.
|
|
35
|
+
|
|
36
|
+
4. **Ajoute le domaine et change le DNS**
|
|
37
|
+
|
|
38
|
+
Ajoute le domaine au projet, pose le TXT de propriété, puis remplace les enregistrements qui pointaient vers Vercel par le CNAME ou le A indiqué. Le détail est dans [Brancher un domaine](/docs/guides/brancher-un-domaine/).
|
|
39
|
+
|
|
40
|
+
5. **Retire le projet de Vercel**
|
|
41
|
+
|
|
42
|
+
Une fois le trafic arrivé et le certificat émis, débranche le dépôt côté Vercel. Tu évites ainsi deux déploiements à chaque push.
|
|
43
|
+
|
|
44
|
+
> **Astuce**
|
|
45
|
+
>
|
|
46
|
+
> Pose d’abord le TXT : il ne change rien au trafic. Ne change le CNAME ou le A que quand le domaine est prêt côté Host. Baisse le TTL de l’enregistrement quelques heures avant la bascule, pour revenir vite en arrière si besoin.
|
|
47
|
+
|
|
48
|
+
## Si ça ne marche pas
|
|
49
|
+
|
|
50
|
+
- La preview affiche une page `501` : une fonction n’est pas encore ouverte à ton organisation. Voir [Préversion](/docs/concepts/preversion/).
|
|
51
|
+
- Le site répond encore depuis Vercel : le DNS n’est pas propagé, ou un ancien enregistrement subsiste. Voir [Dépannage](/docs/guides/depannage/#mon-domaine-reste-en-attente).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!DOCTYPE html><html lang="fr-CH" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-mxbotnn6"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Déployer une app dans un monorepo | Host</title><style>:root{--sl-color-accent-low:#172544;--sl-color-accent:#4b8eff;--sl-color-accent-high:#87d3ff;--hgdc-on-accent:#000000;}:root:not([data-hd-theme="dark"]){--sl-color-accent-low:#dcf1ff;--sl-color-accent:#194ff7;--sl-color-accent-high:#0400bf;--hgdc-on-accent:#ffffff;}</style><link rel="shortcut icon" href="/docs/images/logo.svg" type="image/svg+xml"/><meta name="generator" content="Astro v7.3.8"/><meta name="generator" content="Starlight v0.42.6"/><meta property="og:title" content="Déployer une app dans un monorepo"/><meta property="og:type" content="article"/><meta property="og:locale" content="fr-CH"/><meta property="og:description" content="Déploie une app qui vit dans un sous-dossier, et plusieurs sites d'un même dépôt."/><meta property="og:site_name" content="Host"/><meta name="twitter:card" content="summary_large_image"/><meta name="description" content="Déploie une app qui vit dans un sous-dossier, et plusieurs sites d'un même dépôt."/><link rel="alternate" type="text/markdown" href="/docs/guides/monorepo.md"><link rel="describedby" type="text/markdown" href="/docs/llms.txt"><script>
|
|
2
|
+
;(() => {
|
|
3
|
+
let stored = null
|
|
4
|
+
try {
|
|
5
|
+
stored = localStorage.getItem("starlight-theme")
|
|
6
|
+
} catch {}
|
|
7
|
+
const dark =
|
|
8
|
+
stored === "dark" || (stored === "auto" && matchMedia("(prefers-color-scheme: dark)").matches)
|
|
9
|
+
const theme = dark ? "dark" : "light"
|
|
10
|
+
document.documentElement.dataset.theme = theme
|
|
11
|
+
document.documentElement.dataset.hdTheme = theme
|
|
12
|
+
window.StarlightThemeProvider = { updatePickers() {} }
|
|
13
|
+
})()
|
|
14
|
+
</script><link rel="stylesheet" href="/docs/_astro/print.ehPL0gv-.css" media="print"><link rel="stylesheet" href="/docs/_astro/common.Dx3aBIS0.css"><style>@layer starlight.components{svg:where(.astro-lgqmsw3b){color:var(--sl-icon-color);font-size:var(--sl-icon-size,1em);width:1em;height:1em;overflow:visible}}
|
|
15
|
+
@layer starlight.components{starlight-tabs:where(.astro-a5blunwz){display:block}.tablist-wrapper:where(.astro-a5blunwz){overflow-x:auto}:where(.astro-a5blunwz)[role=tablist]{border-bottom:2px solid var(--sl-color-gray-5);padding:0;list-style:none;display:flex}.tab:where(.astro-a5blunwz){display:flex}.tab:where(.astro-a5blunwz)>:where(.astro-a5blunwz)[role=tab]{--sl-tab-color-border:var(--sl-color-gray-5);line-height:var(--sl-line-height-headings);box-shadow:0 2px 0 var(--sl-tab-color-border);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial;align-items:center;gap:.5rem;padding:.275rem 1.25rem;text-decoration:none;display:flex}.tab:where(.astro-a5blunwz) :where(.astro-a5blunwz)[role=tab][aria-selected=true]{--sl-tab-color-border:var(--sl-color-text-accent);color:var(--sl-color-white);font-weight:600}.tablist-wrapper:where(.astro-a5blunwz)~[role=tabpanel]{margin-top:1rem}}
|
|
16
|
+
</style><script type="module" src="/docs/_astro/page.cNngjUgL.js"></script></head><body class="astro-mxbotnn6"><a class="sl-skip-link astro-k4td3kwj" href="#_top">Aller au contenu</a><div class="hd-page"><header class="hd-topbar"><div class="hd-header"><div class="hd-header__start"><button type="button" class="hd-icon-button hd-menu-button" popovertarget="starlight__sidebar" aria-label="Menu de la documentation" aria-controls="starlight__sidebar"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16M4 12h16M4 17h10"></path></svg></button><a class="hd-brand" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="24" height="24"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="24" height="24"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-header__end"><hd-search data-base="/docs" data-assistant><button type="button" class="hd-search-trigger" data-open aria-haspopup="dialog" aria-label="Rechercher (Ctrl K)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><span class="hd-search-trigger__label">Rechercher</span><kbd class="hd-kbd" data-shortcut>Ctrl K</kbd></button><dialog class="hd-palette" aria-label="Rechercher dans la documentation"><div class="hd-palette__box"><div class="hd-palette__field"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5-2 4 4"></path></svg><input type="search" data-input placeholder="Rechercher dans la documentation" autocomplete="off" spellcheck="false" role="combobox" aria-expanded="false" aria-controls="hd-palette-results" aria-autocomplete="list"><button type="button" class="hd-kbd hd-kbd--button" data-close>Échap</button></div><div class="hd-palette__results" id="hd-palette-results" role="listbox" aria-label="Résultats" data-results></div><p class="hd-palette__status" data-status role="status">Tape un mot pour chercher dans les pages.</p><footer class="hd-palette__hints" aria-hidden="true"><span><kbd class="hd-kbd">↑</kbd><kbd class="hd-kbd">↓</kbd> Choisir</span><span><kbd class="hd-kbd">↵</kbd> Ouvrir</span><span><kbd class="hd-kbd">Échap</kbd> Fermer</span></footer></div></dialog></hd-search><script type="module" src="/docs/_astro/Search.astro_astro_type_script_index_0_lang.D7EcezBU.js"></script><button type="button" class="hd-icon-button" data-hgdc-ask aria-label="Demander à l'assistant" title="Demander à l'assistant (Ctrl I)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg></button><button type="button" class="hd-icon-button hd-theme-button" data-hd-theme-toggle aria-label="Passer au thème sombre"><svg class="hd-icon hd-theme-button__moon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg><svg class="hd-icon hd-theme-button__sun" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><script type="module">var e=`starlight-theme`,t=()=>{try{return localStorage.getItem(e)||`light`}catch{return`light`}},n=()=>matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`,r=t=>{try{localStorage.setItem(e,t)}catch{}let r=t===`auto`?n():t;document.documentElement.dataset.theme=r,document.documentElement.dataset.hdTheme=r,i()},i=()=>{let e=t(),n=document.documentElement.dataset.theme===`dark`;for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.setAttribute(`aria-label`,n?`Passer au thème clair`:`Passer au thème sombre`);for(let t of document.querySelectorAll(`[data-hd-theme]`)){let n=t.dataset.hdTheme===e;t.setAttribute(`aria-checked`,String(n)),t.tabIndex=n?0:-1}};for(let e of document.querySelectorAll(`[data-hd-theme-toggle]`))e.addEventListener(`click`,()=>r(document.documentElement.dataset.theme===`dark`?`light`:`dark`));for(let e of document.querySelectorAll(`.hd-theme-choice`)){let t=[...e.querySelectorAll(`[data-hd-theme]`)];for(let e of t)e.addEventListener(`click`,()=>r(e.dataset.hdTheme));e.addEventListener(`keydown`,e=>{let n=e.key===`ArrowRight`||e.key===`ArrowDown`?1:e.key===`ArrowLeft`||e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let i=t.findIndex(e=>e.getAttribute(`aria-checked`)===`true`),a=t[(i+n+t.length)%t.length];r(a.dataset.hdTheme),a.focus()})}matchMedia(`(prefers-color-scheme: light)`).addEventListener(`change`,()=>{t()===`auto`&&r(`auto`)}),i();</script></div></div></header><nav class="hd-sidebar" aria-label="Navigation de la documentation"><script type="module">for(let e of document.querySelectorAll(`[data-hgdc-version]`))e.addEventListener(`change`,()=>window.location.assign(e.value));var e=document.querySelector(`.sidebar-pane`);if(e){let t=`hd-sidebar-scroll`;try{let n=Number(sessionStorage.getItem(t));n&&(e.scrollTop=n)}catch{}let n=e.querySelector(`[aria-current="page"]`);if(n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();(r.top<t.top||r.bottom>t.bottom)&&n.scrollIntoView({block:`center`})}addEventListener(`pagehide`,()=>{try{sessionStorage.setItem(t,String(e.scrollTop))}catch{}})}</script><hd-sidebar-pane popover="auto" id="starlight__sidebar" class="sidebar-pane"><div class="hd-sidebar__content"><div class="hd-mobile-only hd-sidebar-head"><a class="hd-brand" href="/docs/"><span class="hd-brand__name">Host</span></a><button type="button" class="hd-icon-button" popovertarget="starlight__sidebar" popovertargetaction="hide" aria-label="Fermer le menu"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div><ul class="hd-nav hd-nav--depth-0"><li class="hd-nav__group"><p class="hd-nav__heading">Démarrer</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/" class="hd-nav__link"><span>Accueil</span></a></li><li><a href="/docs/demarrer/premier-site/" class="hd-nav__link"><span>Premier site</span></a></li><li><a href="/docs/demarrer/depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Guides</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/guides/cle-d-api/" class="hd-nav__link"><span>Clés d'API</span></a></li><li><a href="/docs/guides/deployer-depuis-github/" class="hd-nav__link"><span>Depuis GitHub</span></a></li><li><a href="/docs/guides/github-actions-sans-application/" class="hd-nav__link"><span>GitHub Actions sans l'app</span></a></li><li><a href="/docs/guides/deployer-un-framework/" class="hd-nav__link"><span>Un framework</span></a></li><li><a href="/docs/guides/site-statique/" class="hd-nav__link"><span>Site statique</span></a></li><li><a href="/docs/guides/monorepo/" class="hd-nav__link" aria-current="page"><span>Monorepo</span></a></li><li><a href="/docs/guides/brancher-un-domaine/" class="hd-nav__link"><span>Brancher un domaine</span></a></li><li><a href="/docs/guides/variables-d-environnement/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/guides/synchroniser-doppler/" class="hd-nav__link"><span>Doppler</span></a></li><li><a href="/docs/guides/revenir-en-arriere/" class="hd-nav__link"><span>Revenir en arrière</span></a></li><li><a href="/docs/guides/inviter-une-personne/" class="hd-nav__link"><span>Inviter une personne</span></a></li><li><a href="/docs/guides/lire-les-logs/" class="hd-nav__link"><span>Lire les logs</span></a></li><li><a href="/docs/guides/migrer-depuis-vercel/" class="hd-nav__link"><span>Migrer depuis Vercel</span></a></li><li><a href="/docs/guides/depannage/" class="hd-nav__link"><span>Dépannage</span></a></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Référence</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/reference/cli/" class="hd-nav__link"><span>CLI</span></a></li><li><a href="/docs/reference/variables/" class="hd-nav__link"><span>Variables</span></a></li><li><a href="/docs/reference/domaines/" class="hd-nav__link"><span>Domaines</span></a></li><li><a href="/docs/reference/vercel-json/" class="hd-nav__link"><span>vercel.json</span></a></li><li><a href="/docs/reference/compatibilite/" class="hd-nav__link"><span>Compatibilité</span></a></li><li><a href="/docs/reference/limites/" class="hd-nav__link"><span>Limites</span></a></li><li><details class="hd-nav__fold" open><summary class="hd-nav__link"><span>API</span><svg class="hd-icon hd-nav__chevron" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></summary><ul class="hd-nav hd-nav--depth-2"><li><a href="/docs/reference/api/introduction/" class="hd-nav__link"><span>Introduction</span></a></li><li><a href="/docs/reference/api/erreurs/" class="hd-nav__link"><span>Erreurs</span></a></li><li><a href="/docs/reference/api/utilisateur/" class="hd-nav__link"><span>Utilisateur et organisation</span></a></li><li><a href="/docs/reference/api/projets/" class="hd-nav__link"><span>Projets</span></a></li><li><a href="/docs/reference/api/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/reference/api/fichiers/" class="hd-nav__link"><span>Envoyer un fichier</span></a></li><li><a href="/docs/reference/api/variables/" class="hd-nav__link"><span>Variables</span></a></li></ul></details></li></ul></li><li class="hd-nav__group"><p class="hd-nav__heading">Concepts</p><ul class="hd-nav hd-nav--depth-1"><li><a href="/docs/concepts/deploiements/" class="hd-nav__link"><span>Déploiements</span></a></li><li><a href="/docs/concepts/organisations-et-roles/" class="hd-nav__link"><span>Organisations et rôles</span></a></li><li><a href="/docs/concepts/secrets-et-coffre/" class="hd-nav__link"><span>Secrets et coffre</span></a></li><li><a href="/docs/concepts/preversion/" class="hd-nav__link"><span>Préversion</span></a></li><li><a href="/docs/concepts/confidentialite/" class="hd-nav__link"><span>Sécurité et confidentialité</span></a></li></ul></li></ul><div class="hd-mobile-only hd-sidebar-footer"><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></div></hd-sidebar-pane></nav><div class="hd-main-frame main-frame"><script type="module">var e=document.getElementById(`starlight__sidebar`),t=e?.querySelector(`sl-sidebar-state-persist`),n=`sl-sidebar-state`,r=()=>{let r=[],i=t?.dataset.hash||``;try{let e=sessionStorage.getItem(n),t=JSON.parse(e||`{}`);Array.isArray(t.open)&&t.hash===i&&(r=t.open)}catch{}return{hash:i,open:r,scroll:e?.scrollTop||0}},i=e=>{try{sessionStorage.setItem(n,JSON.stringify(e))}catch{}},a=()=>i(r()),o=(e,t)=>{let n=r();n.open[t]=e,i(n)};t?.addEventListener(`click`,e=>{if(!(e.target instanceof Element))return;let t=e.target.closest(`summary`)?.closest(`details`);if(!t)return;let n=t.querySelector(`sl-sidebar-restore`),r=parseInt(n?.dataset.index||``);isNaN(r)||o(!t.open,r)}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&a()});</script><div class="hd-columns hd-columns--toc"><div class="hd-columns__main main-pane"><main data-pagefind-body class="astro-mxbotnn6" lang="fr-CH" dir="ltr"><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="hd-title not-content"><p class="hd-eyebrow" data-pagefind-meta="section">Guides</p><div class="hd-title__row"><h1 id="_top">Déployer une app dans un monorepo</h1><div class="hd-page-actions" data-hgdc-skip data-pagefind-ignore><div class="hd-split"><button type="button" class="hd-split__main" data-hgdc-copy="/docs/guides/monorepo.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span data-label>Copier la page</span></button><details class="hd-menu"><summary class="hd-split__more" aria-label="Autres formats de la page"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"></path></svg></summary><ul class="hd-menu__list"><li><button type="button" data-hgdc-copy-item><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M9 9h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V10a1 1 0 0 1 1-1Zm-4 6H4.5A1.5 1.5 0 0 1 3 13.5v-9A1.5 1.5 0 0 1 4.5 3h9A1.5 1.5 0 0 1 15 4.5V5"></path></svg><span><strong>Copier la page</strong><small>En Markdown, pour un LLM</small></span></button></li><li><a href="/docs/guides/monorepo.md"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm3 9V9l2.5 3L12 9v6m5-6v6m-2-2 2 2 2-2"></path></svg><span><strong>Voir en Markdown</strong><small>La page en texte brut</small></span></a></li><li><a data-hgdc-open="claude" href="https://claude.ai/new" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans Claude</strong><small>Poser une question sur cette page</small></span></a></li><li><a data-hgdc-open="chatgpt" href="https://chatgpt.com/" target="_blank" rel="noopener"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 17 17 7M8 7h9v9"></path></svg><span><strong>Ouvrir dans ChatGPT</strong><small>Poser une question sur cette page</small></span></a></li><li><a href="/docs/llms.txt"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Zm0 0v5h5M9 13h6m-6 4h4"></path></svg><span><strong>llms.txt</strong><small>L'index de la doc pour les agents</small></span></a></li></ul></details></div><span class="sr-only" role="status" aria-live="polite" data-hgdc-copy-status></span></div></div><p class="hd-lead">Déploie une app qui vit dans un sous-dossier, et plusieurs sites d'un même dépôt.</p></div><script type="module">var e=document.querySelector(`[data-hgdc-copy-status]`),t=document.querySelector(`[data-hgdc-copy]`);async function n(){if(!t)return;let n=t.querySelector(`[data-label]`),r=t=>{n.textContent=t,e&&(e.textContent=t),setTimeout(()=>n.textContent=`Copier la page`,2e3)};try{let e=await fetch(t.dataset.hgdcCopy);if(!e.ok)throw Error(String(e.status));await navigator.clipboard.writeText(await e.text()),r(`Page copiée`)}catch{r(`Copie impossible`)}}if(t?.addEventListener(`click`,()=>void n()),document.querySelector(`[data-hgdc-copy-item]`)?.addEventListener(`click`,()=>{document.querySelector(`.hd-menu`).open=!1,n()}),t){let e=`Lis ${new URL(t.dataset.hgdcCopy,location.href).href} et réponds à mes questions sur cette page.`;for(let t of document.querySelectorAll(`[data-hgdc-open]`))t.href=`${t.dataset.hgdcOpen===`claude`?`https://claude.ai/new`:`https://chatgpt.com/`}?q=${encodeURIComponent(e)}`}for(let e of document.querySelectorAll(`.hd-menu`))document.addEventListener(`click`,t=>{e.open&&!e.contains(t.target)&&(e.open=!1)}),e.addEventListener(`keydown`,t=>{t.key===`Escape`&&e.open&&(t.stopPropagation(),e.open=!1,e.querySelector(`summary`)?.focus())});</script></div></div><div class="content-panel astro-64cflj2q"><div class="sl-container astro-64cflj2q"><div class="sl-markdown-content"><p>Ton site peut vivre dans un sous-dossier, comme <code>apps/web</code> ou <code>site/</code>, dans un dépôt qui contient d’autres applications. Indique à Host le dossier racine du projet : c’est là que le build s’exécute.</p>
|
|
17
|
+
<p><strong>Résultat attendu</strong> : le build s’exécute depuis le dossier de ton app, et seule cette app est publiée.</p>
|
|
18
|
+
<h2 id="détection-à-limport">Détection à l’import</h2>
|
|
19
|
+
<p>À l’import GitHub, Host lit tout le dépôt et cherche les dossiers qui contiennent un <code>package.json</code>, jusqu’à quatre niveaux de profondeur. Il préfère, dans l’ordre :</p>
|
|
20
|
+
<ol>
|
|
21
|
+
<li>un framework reconnu ;</li>
|
|
22
|
+
<li>un dossier qui a un script <code>build</code> ;</li>
|
|
23
|
+
<li>un nom usuel : <code>web</code>, <code>site</code>, <code>www</code>, <code>frontend</code>, <code>app</code>, <code>landing</code>, <code>marketing</code> ;</li>
|
|
24
|
+
<li>le dossier le moins profond.</li>
|
|
25
|
+
</ol>
|
|
26
|
+
<p>La racine d’un monorepo, avec un champ <code>workspaces</code>, un <code>pnpm-workspace.yaml</code>, un <code>turbo.json</code> ou un <code>nx.json</code>, n’est jamais choisie seule. Si le dépôt contient plusieurs applications, choisis celle à déployer. Les dossiers <code>node_modules</code>, <code>dist</code>, <code>build</code> et les caches sont ignorés.</p>
|
|
27
|
+
<p>Pour changer le dossier après l’import, modifie le <strong>dossier racine</strong> dans les réglages du projet.</p>
|
|
28
|
+
<h2 id="le-fichier-de-verrouillage">Le fichier de verrouillage</h2>
|
|
29
|
+
<p>Dans un monorepo, le fichier de verrouillage, comme <code>pnpm-lock.yaml</code> ou <code>bun.lock</code>, est souvent à la racine. Il compte pour toutes les applications : la commande d’installation suit le gestionnaire qu’il désigne.</p>
|
|
30
|
+
<h2 id="plusieurs-sites-dans-un-dépôt">Plusieurs sites dans un dépôt</h2>
|
|
31
|
+
<p>Importe le dépôt une fois par site, en choisissant à chaque fois un dossier différent. Chaque projet a ses domaines, ses variables et son historique.</p>
|
|
32
|
+
<h2 id="avec-la-cli">Avec la CLI</h2>
|
|
33
|
+
<p>Lance la CLI depuis le dossier de l’app :</p>
|
|
34
|
+
<div class="expressive-code"><link rel="stylesheet" href="/docs/_astro/ec.t9qpe.css"><script type="module" src="/docs/_astro/ec.0vx5m.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="bash"><code><div class="ec-line"><div class="code"><span style="--0:#0550AE;--1:#79C0FF">cd</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">apps/web</span></div></div><div class="ec-line"><div class="code"><span style="--0:#953800;--1:#FFA657">vercel</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0550AE;--1:#79C0FF">--api</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">https://api.host.hgdc.ch</span><span style="--0:#1F2328;--1:#E6EDF3"> </span><span style="--0:#0A3069;--1:#A5D6FF">deploy</span></div></div></code></pre><div class="copy"><div aria-live="polite"></div><button title="Copier dans le presse-papiers" data-copied="Copié !" data-code="cd apps/webvercel --api https://api.host.hgdc.ch deploy"><div></div></button></div></figure></div>
|
|
35
|
+
<p>Avec <code>vercel build</code> et <code>--prebuilt</code>, la même règle s’applique : construis depuis le dossier de l’app. Voir <a href="/docs/guides/deployer-un-framework/">Déployer un framework</a>.</p>
|
|
36
|
+
<h2 id="si-ça-ne-marche-pas">Si ça ne marche pas</h2>
|
|
37
|
+
<ul>
|
|
38
|
+
<li>Le build ne trouve pas tes dépendances : ton dossier est sans doute le mauvais. Vérifie que le dossier racine contient le <code>package.json</code> de l’app, et que le fichier de verrouillage est bien à la racine du dépôt.</li>
|
|
39
|
+
<li>Host propose la racine du monorepo : choisis le dossier de l’application, pas la racine.</li>
|
|
40
|
+
</ul></div><hgdc-feedback class="hgdc-feedback not-content" data-endpoint="https://docs.hgdc.ch/api/v1/feedback" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-pagefind-ignore="true"><div data-step="ask"><p class="hgdc-feedback__question">Cette page t'a aidé ?</p><div class="hgdc-feedback__choices"><button type="button" data-helpful="true"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M7 10v11M15 5.9 14 10h5.8a2 2 0 0 1 1.9 2.5l-2.3 7A2 2 0 0 1 17.5 21H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h2.8a2 2 0 0 0 1.8-1.1L12 2a3.1 3.1 0 0 1 3 3.9Z"></path></svg>Oui</button><button type="button" data-helpful="false"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 14V3M9 18.1 10 14H4.2a2 2 0 0 1-1.9-2.5l2.3-7A2 2 0 0 1 6.5 3H20a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-2.8a2 2 0 0 0-1.8 1.1L12 22a3.1 3.1 0 0 1-3-3.9Z"></path></svg>Non</button></div></div><form data-step="comment" hidden><label for="hgdc-feedback-comment">Qu'est-ce qui manquait ou pourrait être plus clair ? (facultatif)</label><textarea id="hgdc-feedback-comment" name="comment" rows="3" maxlength="1000"></textarea><div class="hgdc-feedback__choices"><button type="submit">Envoyer</button><button type="button" data-skip>Passer</button></div></form><p data-step="done" class="hgdc-feedback__done" role="status" hidden>Merci, c'est noté.</p></hgdc-feedback><nav class="hd-pagination not-content" aria-label="Pages voisines" data-pagefind-ignore><a class="hd-pagination__link" href="/docs/guides/site-statique/" rel="prev"><span class="hd-pagination__hint"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m15 6-6 6 6 6"></path></svg>Précédent</span><span class="hd-pagination__title">Site statique</span></a><a class="hd-pagination__link hd-pagination__link--next" href="/docs/guides/brancher-un-domaine/" rel="next"><span class="hd-pagination__hint">Suivant<svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="m9 6 6 6-6 6"></path></svg></span><span class="hd-pagination__title">Brancher un domaine</span></a></nav><script type="module" src="/docs/_astro/Footer.astro_astro_type_script_index_0_lang.DzCnn3OT.js"></script></div></div></main><form class="hd-askbar" data-askbar data-pagefind-ignore><label class="sr-only" for="hd-askbar-input">Pose une question à l'assistant</label><input id="hd-askbar-input" data-askbar-input type="text" maxlength="1000" placeholder="Pose une question…" autocomplete="off"><kbd class="hd-kbd" data-shortcut aria-hidden="true">Ctrl I</kbd><button type="submit" class="hd-send" aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form></div><aside class="hd-columns__toc" aria-label="Sur cette page"><div class="hd-toc-scroll"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">Sur cette page</h2><ul class="astro-jxyovztp" style="--depth: 0;"><li style="--depth: 0;" class="astro-jxyovztp"><a href="#_top" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Vue d’ensemble</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#détection-à-limport" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Détection à l’import</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#le-fichier-de-verrouillage" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Le fichier de verrouillage</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#plusieurs-sites-dans-un-dépôt" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Plusieurs sites dans un dépôt</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#avec-la-cli" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Avec la CLI</span></a></li><li style="--depth: 0;" class="astro-jxyovztp"><a href="#si-ça-ne-marche-pas" style="--depth: 0;" class="astro-jxyovztp"><span style="--depth: 0;" class="astro-jxyovztp">Si ça ne marche pas</span></a></li></ul></nav></starlight-toc><script type="module">var e=`_top`,t=class extends HTMLElement{_current=this.querySelector(`a[aria-current="true"]`);minH=parseInt(this.dataset.minH||`2`,10);maxH=parseInt(this.dataset.maxH||`3`,10);tocHeadingSelector=`h1#${e},:where(${[...Array.from({length:1+this.maxH-this.minH}).map((e,t)=>`h${this.minH+t}`)].join()})[id]`;set current(e){e!==this._current&&(this._current&&this._current.removeAttribute(`aria-current`),e.setAttribute(`aria-current`,`true`),this._current=e)}onIdle=e=>(window.requestIdleCallback||(e=>setTimeout(e,1)))(e);constructor(){super(),this.onIdle(()=>this.init())}init=()=>{let t=[...this.querySelectorAll(`a`)],n=e=>e.matches(this.tocHeadingSelector),r=t=>{for(;t;){if(t.matches(`.sl-markdown-content, main > *`))return document.getElementById(e);if(n(t))return t;let r=t.querySelector(this.tocHeadingSelector);if(r)return r;let i=t.previousElementSibling;for(;i?.lastElementChild;)i=i.lastElementChild;t=i??t.parentElement}return null},i=e=>{for(let{isIntersecting:n,target:i}of e){if(!n)continue;let e=r(i);if(!e)continue;let a=t.find(t=>t.hash===`#`+encodeURIComponent(e.id));if(a){this.current=a;break}}},a=document.querySelectorAll([`main :where(${this.tocHeadingSelector})`,`main :where(${this.tocHeadingSelector}, .sl-heading-wrapper) ~ *:not(:has(${this.tocHeadingSelector}))`,`main .sl-markdown-content > *:not(:has(${this.tocHeadingSelector}))`,`main > *:not(:has(${this.tocHeadingSelector}))`].join()),o,s=()=>{o||(o=new IntersectionObserver(i,{rootMargin:this.getRootMargin()}),a.forEach(e=>o.observe(e)))};s();let c;window.addEventListener(`resize`,()=>{o&&=(o.disconnect(),void 0),clearTimeout(c),c=setTimeout(()=>this.onIdle(s),200)})};getRootMargin(){let e=(document.querySelector(`header`)?.getBoundingClientRect().height||0)+(this.querySelector(`summary`)?.getBoundingClientRect().height||0)+32;return`-${e}px 0% ${e+53-document.documentElement.clientHeight}px`}};customElements.define(`starlight-toc`,t);</script></div></aside></div><footer class="hd-site-footer" data-pagefind-ignore><div class="hd-site-footer__row"><a class="hd-brand hd-brand--footer" href="/docs/"><span class="hd-brand__mark"><img class="hd-brand__light" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"><img class="hd-brand__dark" src="/docs/images/logo.svg" alt="" width="20" height="20" loading="lazy"></span><span class="hd-brand__name">Host</span></a></div><div class="hd-site-footer__row hd-site-footer__row--meta"><p>Ton site en ligne, déployé à chaque modification.</p><div class="hd-theme-choice" role="radiogroup" aria-label="Thème"><button type="button" role="radio" aria-checked="false" data-hd-theme="auto" aria-label="Système" title="Système"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1Zm4 15h8m-4-3v3"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="light" aria-label="Clair" title="Clair"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 16a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4"></path></svg></button><button type="button" role="radio" aria-checked="false" data-hd-theme="dark" aria-label="Sombre" title="Sombre"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z"></path></svg></button></div></div></footer></div><hgdc-assistant data-endpoint="https://docs.hgdc.ch/api/v1/ask" data-project="js743wp3001k1jvrdad0fwcjx18gc789" data-name="Host"><section class="hgdc-panel" role="dialog" aria-modal="false" aria-labelledby="hgdc-assistant-title" data-panel inert><div class="hgdc-panel__grip" aria-hidden="true"></div><header class="hgdc-panel__header"><h2 id="hgdc-assistant-title"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3.5 13.6 8a3 3 0 0 0 1.9 1.9L20 11.5l-4.5 1.6a3 3 0 0 0-1.9 1.9L12 19.5 10.4 15a3 3 0 0 0-1.9-1.9L4 11.5 8.5 9.9A3 3 0 0 0 10.4 8ZM19 3v3M20.5 4.5h-3"></path></svg>Assistant</h2><div class="hgdc-panel__tools"><button type="button" class="hd-icon-button" data-reset aria-label="Nouvelle conversation" title="Nouvelle conversation" hidden><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12a8 8 0 1 0 2.3-5.7M4 4v4h4"></path></svg></button><button type="button" class="hd-icon-button" data-close aria-label="Fermer l'assistant" title="Fermer (Échap)"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6l12 12M18 6 6 18"></path></svg></button></div></header><div class="hgdc-panel__body" data-log aria-live="polite"><div class="hgdc-empty" data-empty><p class="hgdc-empty__title">Pose ta question sur Host.</p><p>Je cherche dans les pages de cette documentation et je cite mes sources. Si la réponse n'y est pas, je te le dis.</p></div></div><form class="hgdc-panel__form" data-form><label class="sr-only" for="hgdc-question">Ta question</label><textarea id="hgdc-question" data-input rows="1" maxlength="1000" placeholder="Pose une question…" required></textarea><button type="submit" class="hd-send" data-send aria-label="Envoyer la question"><svg class="hd-icon" aria-hidden="true" viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M12 19V5m-6 6 6-6 6 6"></path></svg></button></form><p class="hgdc-panel__note">Réponses générées par IA (Claude, d'Anthropic), à vérifier. Les questions sont conservées 90 jours pour améliorer cette documentation.</p></section></hgdc-assistant><script type="module" src="/docs/_astro/Assistant.astro_astro_type_script_index_0_lang.C1pz7yK1.js"></script></div><script type="module">var e=class extends HTMLElement{connectedCallback(){let e=matchMedia(`(min-width: 50em)`),t=()=>{e.matches&&this.matches(`:popover-open`)&&this.hidePopover(),this.popover=e.matches?null:`auto`};t(),e.addEventListener(`change`,t),this.addEventListener(`toggle`,e=>{let t=e.newState===`open`;for(let e of document.querySelectorAll(`.hd-main-frame, .hd-askbar`))e.toggleAttribute(`inert`,t);document.documentElement.toggleAttribute(`data-hd-menu`,t)}),this.addEventListener(`click`,e=>{e.target.closest(`a`)&&this.matches(`:popover-open`)&&this.hidePopover()})}};customElements.define(`hd-sidebar-pane`,e);</script></body></html>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Déployer une app dans un monorepo
|
|
2
|
+
|
|
3
|
+
Ton site peut vivre dans un sous-dossier, comme `apps/web` ou `site/`, dans un dépôt qui contient d’autres applications. Indique à Host le dossier racine du projet : c’est là que le build s’exécute.
|
|
4
|
+
|
|
5
|
+
**Résultat attendu** : le build s’exécute depuis le dossier de ton app, et seule cette app est publiée.
|
|
6
|
+
|
|
7
|
+
## Détection à l’import
|
|
8
|
+
|
|
9
|
+
À l’import GitHub, Host lit tout le dépôt et cherche les dossiers qui contiennent un `package.json`, jusqu’à quatre niveaux de profondeur. Il préfère, dans l’ordre :
|
|
10
|
+
|
|
11
|
+
1. un framework reconnu ;
|
|
12
|
+
2. un dossier qui a un script `build` ;
|
|
13
|
+
3. un nom usuel : `web`, `site`, `www`, `frontend`, `app`, `landing`, `marketing` ;
|
|
14
|
+
4. le dossier le moins profond.
|
|
15
|
+
|
|
16
|
+
La racine d’un monorepo, avec un champ `workspaces`, un `pnpm-workspace.yaml`, un `turbo.json` ou un `nx.json`, n’est jamais choisie seule. Si le dépôt contient plusieurs applications, choisis celle à déployer. Les dossiers `node_modules`, `dist`, `build` et les caches sont ignorés.
|
|
17
|
+
|
|
18
|
+
Pour changer le dossier après l’import, modifie le **dossier racine** dans les réglages du projet.
|
|
19
|
+
|
|
20
|
+
## Le fichier de verrouillage
|
|
21
|
+
|
|
22
|
+
Dans un monorepo, le fichier de verrouillage, comme `pnpm-lock.yaml` ou `bun.lock`, est souvent à la racine. Il compte pour toutes les applications : la commande d’installation suit le gestionnaire qu’il désigne.
|
|
23
|
+
|
|
24
|
+
## Plusieurs sites dans un dépôt
|
|
25
|
+
|
|
26
|
+
Importe le dépôt une fois par site, en choisissant à chaque fois un dossier différent. Chaque projet a ses domaines, ses variables et son historique.
|
|
27
|
+
|
|
28
|
+
## Avec la CLI
|
|
29
|
+
|
|
30
|
+
Lance la CLI depuis le dossier de l’app :
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd apps/web
|
|
34
|
+
vercel --api https://api.host.hgdc.ch deploy
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Avec `vercel build` et `--prebuilt`, la même règle s’applique : construis depuis le dossier de l’app. Voir [Déployer un framework](/docs/guides/deployer-un-framework/).
|
|
38
|
+
|
|
39
|
+
## Si ça ne marche pas
|
|
40
|
+
|
|
41
|
+
- Le build ne trouve pas tes dépendances : ton dossier est sans doute le mauvais. Vérifie que le dossier racine contient le `package.json` de l’app, et que le fichier de verrouillage est bien à la racine du dépôt.
|
|
42
|
+
- Host propose la racine du monorepo : choisis le dossier de l’application, pas la racine.
|