diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5f4f0f7805745ecbdf8fe6e3c947375afface605..a17f1708568aa3b7fa1641fee81df8a2386f127f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,29 +1,30 @@ image: ruby:2.5 -variables: - JEKYLL_ENV: production - -before_script: +build the website: + stage: build + before_script: - bundle install && bundle update - -test: - stage: test script: - - bundle exec jekyll build -d test + - 'echo "baseurl: /$CI_PROJECT_NAME" >> _config_ci.yml' + - 'echo "url: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN" >> _config_ci.yml' + - bundle exec jekyll build -d test --config "_config.yml,_config_ci.yml" + - 'echo $CI_COMMIT_SHA > test/version' artifacts: - expire_in: 1 week + expire_in: 3 days paths: - test - except: - - master + variables: + JEKYLL_ENV: production -pages: +deploy the pages: stage: deploy + only: + - master + - develop script: - - bundle exec jekyll build -d public + - mv test public + - echo "Your website is available at $CI_PAGES_URL" artifacts: expire_in: 1 week paths: - public - only: - - master diff --git a/_config.yml b/_config.yml index 1735c7d59f6e832f2365ddd4ab8022ef92982d56..11a4b718c0323052ab91e523facda445094cfbfc 100644 --- a/_config.yml +++ b/_config.yml @@ -19,9 +19,11 @@ description: >- # this means to ignore newlines until "baseurl:" line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description. -# URL settings (the most difficult part, please refer to the guide) -baseurl: "/pages-jekyll-lcsb-template" # the subpath of your site, e.g. /gitlab-repository-name -url: "" # the base hostname & protocol for your site, e.g. http://gitlab-namespace-name.pages.uni.lu/ +# URL settings that will be used to access on your local machine +# Note #1: you will need to use port 4000, https://localhost:4000/website in your browser) +# Note #2: the configuration used in GitlabCI is generated in .gitlab-ci.yml file automatically for you +baseurl: "/website" +url: "https://localhost" # Banner settings banner: default # When you have custom images, change this setting's value to the name of the folder containing them diff --git a/index.md b/index.md index e5e7a3d0e51be1c460aebe7485e6b7ca9d375312..a648894d85c760ed4a3b5e26aeedf27a74e17638 100644 --- a/index.md +++ b/index.md @@ -29,11 +29,9 @@ Additionally, you can also navigate to the [repository for theme](https://git-r3 9. (optional) In gitlab, go to **Settings** (under left-hand menu) > **General** > **Advanced** (hit `Expand` button) > **Remove fork relationship** (red button), then follow the instructions from the pop-up. ## What should you change in settings file? -Mandatory: - * `baseurl` - this is very important. Set it to the name of the project (i.e. repository name). Here it's `pages-jekyll-lcsb-template` - * `url` - this is equally important. Please set it to `https://gitlab-namespace-name.pages.uni.lu`. For example - if your project is inside `core-services` namespace, it should be: `url: "https://core-services.pages.uni.lu"`. For `minerva`, it would be: `url: "https://minerva.pages.uni.lu"`. - -Optional: +Nothing! :) We've taken care of everything for you! + +You may want to change: * `title` field * `e-mail` field * `description` field