Let's Encrypt a custom domain Page using Jekyll

Hi, I am trying to encrypt my Gitlab Page and I cannot get past the acme-challenge stage.

I have just opened a Gitlab account, created a private Project and followed the GitLab Pages.
I used the Pages/Jekyll Template.
I then followed the Setup Pages with a Custom Domain for a root domain, deanleggo.com
I verified my status and my Page is working at deanleggo.com

I am having trouble adding SSL/TSL to the Page, I am following the steps at Let’s Encrypt for GitLab Pages

I tried adding the challenge file to my Page but it is never visible.
I created the file .well-known/acme-challenge/(file-name)/index.html with the prompt message.
But when I try http://deanleggo.com/.well-known/acme-challenge/(file-name)
it redirects to https://gitlab.com/-/acme-challenge?domain=deanleggo.com&token=(file-name) with a 404 error.

I don’t know if there is something in Jekyll or the GitLab pipeline I need to change to get the url working. I have pasted the .gitlab-ci.yml file below. I have not modified it. I tried following step others have written, but they have not worked and are 2 or more years old. Also there is no public folder in my repo, so I don’t know where my website gets served from.

Can anyone please add some guidence?

image: ruby:2.3

variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8

before_script:
  - bundle install

test:
  stage: test
  script:
  - bundle exec jekyll build -d test
  artifacts:
    paths:
    - test
  except:
  - master

pages:
  stage: deploy
  script:
  - bundle exec jekyll build -d public
  artifacts:
    paths:
    - public
  only:
  - master

I found an answer :grinning: But just as I was about to add the certificate and keys to the Pages Domain.
THERE IS A TOGGLE BUTTON TO AUTOMATICALLY ADD A LET’S ENCRYPT CERTIFICATE!!
So I just clicked it and in a few minutes it was done :joy:

Anyway, this is what I did to add a file to the Pages Server.

I created a directory .acme-challenge and inside I created a plain file with the name and contents Let’s Encrypt wants.

In the .gitlab-ci.yml file, I added two lines to move the file onto the Page server.

pages:
  stage: deploy
  script:
  - bundle exec jekyll build -d public

  #add acme-challenge files to the website
  - mkdir -p public/.well-known/acme-challenge/
  - cp .acme-challenge/* public/.well-known/acme-challenge/

  artifacts:
    paths:
    - public
  only:
  - master