3

I have a repo like this:

  • App // app source code
  • Website // website source code, where my GitLab pages are

What I'd like is when i run .gitlab-ci.yml, it deploys all the files in the Website directory. Right now, I get errors when it tries to deploy. How can I achieve this? This is my current .gitlab-ci.yml:

image: ruby:2.3

variables:
  JEKYLL_ENV: production

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

2 Answers 2

2

you need to add this:

publish: path/to/your/folder

under the page entry like below:

pages:
    publish: path/to/your/folder
Sign up to request clarification or add additional context in comments.

Comments

0

A directory called "public" in your site's repo is a requisite for working with pages: https://docs.gitlab.com/ee/user/project/pages/introduction.html

Comments

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.