1

I'm trying to deploy static pages with gitlab ci, and create a directory for each branch and commit. Similar to Gitlab pages - Incremental deploy But when I try to look at the branch it gives me a 404. My gitlab ci look something like this:

image: busybox
pages:
  script:
    - echo "public/$CI_COMMIT_REF_NAME, public/$CI_COMMIT_SHORT_SHA"
    - mkdir -p "public/$CI_COMMIT_REF_NAME" "public/$CI_COMMIT_SHORT_SHA"
    - cp web/* "public/$CI_COMMIT_REF_NAME/"
    - cp web/* "public/$CI_COMMIT_SHORT_SHA/"
    - cp test.html public/
  artifacts:
    paths:
      - public

I have tried:

  • exmpl.co/[commit hash]/
  • exmpl.co/[commit hash]/index.html
  • exmpl.co/[branch]/
  • exmpl.co/[branch]/index.html

without success. I added test.html to the root of server, and it is accessible.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.