Gitlab Pages change branch name problem

I have a Gitlab Pages website at Daniel Santos / alexandre1985.gitlab.io · GitLab .

Locally, I have changed the repository main branch name from ‘master’ to ‘main’ with git branch -m main. Pushed a new commit and my Gitlab Pages website is not updating with the new commit.

I have set the default branch to be ‘main’ in Gitlab still my website is not updating.

Need help.

Hi @alexandre1985

Your YAML config says this:

pages:
  stage: deploy
  script:
    - mkdir .public
    - cp -r * .public
    - mv .public public
  artifacts:
    paths:
      - public
  only:
    - master

So, I think you need to change that to:

pages:
....
  only:
    - main

Regards,

Sarah

Hi Sarah :wave:

That did it. Thank you so much. :tada::tada:

Have a great day!

1 Like