diff --git a/src/content/docs/en/guides/deploy/github.mdx b/src/content/docs/en/guides/deploy/github.mdx index b285e53ce1ed2..9de8c55fff639 100644 --- a/src/content/docs/en/guides/deploy/github.mdx +++ b/src/content/docs/en/guides/deploy/github.mdx @@ -6,7 +6,7 @@ sidebar: type: deploy i18nReady: true --- -import { Steps, FileTree } from '@astrojs/starlight/components'; +import { Steps } from '@astrojs/starlight/components'; You can use [GitHub Pages](https://pages.github.com/) to host an Astro website directly from a repository on [GitHub.com](https://github.com/). @@ -18,32 +18,6 @@ Astro maintains the official `withastro/action` to deploy your project with very ## Configure Astro for GitHub Pages -You can deploy your Astro site on GitHub Pages with a few configuration steps to ensure that your project can be processed and built successfully. - -### Preparing your Astro project for GitHub Pages - -By default, GitHub Pages applies Jekyll static site processing, which can interfere with files and folders that begin with an underscore such as Astro's `_astro/` directory. - -To prevent this Jekyll processing, add an empty `.nojekyll` file to your Astro project's `public/` directory. Astro will automatically copy this file into the final `dist/` folder during the build process. This disables Jekyll on GitHub Pages and ensures that your Astro project files are correctly served. - -The following example shows this file added to a minimal Astro project: - - - -- public/ - - **.nojekyll** - - favicon.svg -- src/ - - pages/ - - index.astro - - styles/ - - global.css -- astro.config.mjs -- package.json -- tsconfig.json - - - ### Deploying to a `github.io` URL Set the [`site`](/en/reference/configuration-reference/#site) and [`base`](/en/reference/configuration-reference/#base) options in `astro.config.mjs`.