Gitlab Pages deployment 404 issue

Problem to solve

Until now I was able to publish my static HTML, CSS and Javascript website using Gitlab Pages. Now I get a 404 after re-triggering the deployment:

This is my Gitlab pipeline configuration:

stages:
- test
- deploy
sast:
  stage: test

include:
- template: Security/SAST.gitlab-ci.yml
  only:
    - tags  # Only run this job for tags

# Deploy on gitlab Pages
pages:
  stage: deploy
  environment: production
  script:
  - mkdir .public
  - mkdir puplic
  - cp -r * .public
  - mv .public public
  artifacts:
    paths:
    - public
  only:
    - tags  # Only run this job for tags

As I said, all of a sudden nothing worked.

Steps to reproduce

I’m not sure if someone can confirm this or if it’s me :slightly_smiling_face:

  1. create an index.html file in your repo
  2. create the Gitlab pipeline
  3. run the pipeline
  4. go to username.gitlab.io/repository
  5. 404 Error

Versions

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Version

I don’t know. Current version of gitlab.com

I would like to thank you in advance for your time!