- Update your app to output files to the
- Set up the
This tutorial assumes you have a project that either:
- Generates static sites or a client-rendered single-page application (SPA), such as Eleventy, Astro, or Jekyll.
- Contains a framework configured for static output, such as Next.js, Nuxt.js, or SvelteKit.
GitLab Pages requires all files intended to be part of the published website to
be in a root-level folder called
public. If you create this folder during the build
pipeline, committing it to Git is not required.
For detailed instructions, read Configure the public files folder.
GitLab helps you write the
.gitlab-ci.yml needed to create your first GitLab Pages
deployment pipeline. Rather than building the file from scratch, it asks you to
provide the build commands, and creates the necessary boilerplate for you.
To build your YAML file from the GitLab UI:
- On the top bar, select Main menu > Projects and find your project.
- On the left sidebar, select Settings > Pages to display the friendly interface Get Started With Pages.
- If your framework’s build process does not need one of the provided build
commands, you can either:
- Skip the step by selecting Next.
:(the bash “do nothing” command) if you still want to incorporate that step’s boilerplate into your
- Optional. Edit and adjust the generated
.gitlab-ci.ymlfile as needed.
- Commit your
.gitlab-ci.ymlto your repository. This commit triggers your first GitLab Pages deployment.
GitLab doesn’t show this interface if you have either:
- Deployed a GitLab Pages site before.
- Committed a
.gitlab-ci.ymlthrough this interface at least once.
To fix this problem:
- If you see the message Waiting for the Pages Pipeline to complete, select Start over to start the wizard again.
- If your project has previously deployed GitLab Pages successfully,
manually update your