Gitlab Pages html in project's build folder

I just finished a complex static page in Typescript and three.js and was excited to deploy it to Gitlab’s Pages but I haven’t been able to figure out the right path configuration for the CI pipeline and would please like some help.

My previous Gitlab Pages easily deployed to the expected namespace URL when I followed the Gitlab’s docs for plain pages but in those cases the public folder was always in the root directory of the project.

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

However, for my more complex TypeScript project the path to the public folder is build/public. Sometimes I’ve tried:

  • update the path to build/path.
  • redeployed the page.
  • waited +30min.

Nothing in my research suggests this configuration is invalid and it’s working as expected locally. How do I fix my yml so my page deploys correctly?

Hi @BBirdsell
it needs to be in $CI_PROJECT_DIR/public. It cannot be placed anywhere else.

Thank you for clarifying. I will update the structure of the project accordingly. There was just enough ambiguity in the docs I wasn’t sure and was hopefully the more flexible solution would somehow be made to work. For free static hosting one can’t complain too much.