Why is "Pages" not appearing in settings?

In the help on GitLab Pages the setup sound quite easy:

  1. Fork an example project:
    by forking a project, you create a copy of the codebase you’re forking from to start from a template instead of starting from scratch.
  2. Change a file to trigger a GitLab CI/CD pipeline: GitLab CI/CD will build and deploy your site to GitLab Pages.
  3. Visit your project’s Settings > Pages to see your website link, and click on it. Bam! Your website is live! :slight_smile:

My problem: Pages does not appear in my settings, even though I had a CI job running, that “published” the files to /public.
Do I have to additionally activate the pages anywhere? I can’t find a corresponding setting.

the Pages section will automatically show up assuming your CI job passed.

If you want further help, you’ll want to either link to the .yml file in your repository, or if it’s private, copy and paste the contents of the file into your original post

I am having the same issue. This is my .yml file and my passed CI job. I have used gitlab pages before with no problems and “Pages” always appeared. But, now it is not working in the group project I am working on.

the script section of the .yml file needs to make the /public directory for the artifact to be put inside. If you look at any of the example projects, you’ll see a line doing so.

For example:

- mv _build/html/ public/

from: .gitlab-ci.yml · master · GitLab Pages examples / sphinx · GitLab

It is making the /public directory when executing FLASK_APP=app.py flask freeze. I was using this example: https://gitlab.com/pages/frozen-flask/blob/master/.gitlab-ci.yml

I made some changes to my .yml file and ran the pipeline again:


It passed.

“Pages” still doesn’t appear in my project settings.

Apologies. My knowledge of flask is pretty minimal.

And sorry for not catching this earlier, but I realize you’re trying to create pages for a group. As per our pages documentation, for groups, you must create a project called websites.gitlab.io and build it there. If you want to use an existing project, you could rename the project instead of creating a new one.

“Maybe” my answer is to late for the OP but it is hopefully a help for all of you still running into this Problem. :wink:

If you are using gitlab in Docker environment you have to enable Pages in your container configuration (gitlab.rb):

root@gitlab:/# vi /etc/gitlab/gitlab.rb
....
##! Define to enable GitLab Pages
pages_external_url "http://your.gitlab.domain/"
gitlab_pages['enable'] = true
....

Restart your container and the Option is available as described.

Please also refer https://docs.gitlab.com/15.7/ee/administration/pages/#configuration for additional infos and take a look at the security recommendations.

3 Likes

Late but with great information and problem-solving. :wink: