Create a Pages website from a forked sample => 404
Enabling Gitlab pages Not working
continuous integration - Self hosted GitLab pages not showing at Setting page even if my CI building public/ folder runs successfully - Stack Overflow
How to activate Gitlab Pages Properly? - Stack Overflow
Ok, before ask, look at config files, my mistake.
There is no word about enabling Gitlab Pages in /etc/gitlab/gitlab.rb (in case of omnibus installs).
Current link to pages documentation: GitLab Pages
If you run into bind mount issue when using docker volume you'll also need to set this:
gitlab_pages['inplace_chroot'] = true
The job needs to be named pages.
Per the documentation
pages
pagesis a special job that is used to upload static content to GitLab that can be used to serve your website. It has a special syntax, so the two requirements below must be met:
- Any static content must be placed under a
public/directory.artifactswith a path to thepublic/directory must be defined.
Starting with GitLab 17.6, you can define a custom job name for deploying GitLab Pages by including the pages: true property in your .gitlab-ci.yml file.
Previously, GitLab required a job named exactly pages to trigger a Pages deployment. Now, you can use any job name, provided you specify pages: true in the job definition.
Here's an example of how to configure this:
deploy-pages:
stage: deploy
script:
- echo "Deploying to GitLab Pages"
pages: true
artifacts:
paths:
- public
In this configuration:
deploy-pagesis a user-defined job name.pages: trueindicates that this job is responsible for deploying to GitLab Pages.artifactsspecifies the directory (public) containing the static site files to be published.
For more details, refer to the GitLab documentation on user-defined job names for Pages.
Greetings,
keep in mind that I come from github, where creating a github pages static website consists of just placing html files in a repository with the correct name.
I followed the guide to create a gitlab pages website. I created its script thing. Then it said it had no "runner" for the pipeline/job.
Then I created that runner, I installed gitlab-runner.exe as explained, copied the stuff it told me to copy in the command line, called gitlab-runner.exe run. The job started, and it failed. In the terminal that is running gitlab-runner I got this error:
ERROR: Job failed (system failure): prepare environment: failed to start process: exec: "pwsh": executable file not found in %PATH%. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information duration_s=0.0085868 job=52 project=113 runner=uuj-sLTL2
I couldn't find a single gitlab guide that said anything specific about what else I need to do to setup this convoluted mess. The runners documentation doesn't mention pages deployment, the pages documentation doesn't mention runners at all.
What am I supposed to do? Where can I read about the setup steps that I'm evidently missing?
I'm also wondering, does the runner only take care of some behind-the-scenes process to build the website, and it'll be hosted in the gitlab server, or is the website going to be dependent on having the runner.exe process constantly active?
Sorry for the ranty tone, I just didn't expect this to eat up half a day.
Edit: it's likely relevant, we're not using the public gitlab website, we're using a self-hosted version within the company.
Edit edit: I fixed the issue, the runner now runs and the job completes. However i cannot access the pages page.Deploy doesn't contain any "pages" tab, only Releases, Feature flags, Package Registry. If I search "pages" in Settings/General I see an info box
GitLab Pages has moved
To go to GitLab Pages, on the left sidebar, select Deploy > Pages. ù
But the link it redirects to is a 404.
This is my .gitlab-ci.yml file:
image: alpine:latest
pages:
stage: deploy
script:
- echo 'Nothing to do...'
artifacts:
paths:
- public
only:
- masterAnd the public directory contains a hierarchy of html files and subdirectories. The master branch is master, no main/master issue either.
