瀏覽代碼

Update .gitlab-ci.yml and README.md to specify production Jekyll configuration

If a user is using GitLab Pages it is most likely the user is using GitLab pages to publish a website not just stage a website that is published elsewhere.  If a user is publishing a website with Jekyll, they (and Jekyll themes/plugins) will expect that JEKYLL_ENV=production.  This commit provides that specification in `.gitlab-ci.yml`.

An examination of the existing repository showed this should not result in any change to the current rendering of the website.  However, the specification may be important for developers as explained in preceding commit.
Adam Voss 8 年之前
父節點
當前提交
f2989df305
共有 2 個文件被更改,包括 9 次插入2 次删除
  1. 6 2
      .gitlab-ci.yml
  2. 3 0
      README.md

+ 6 - 2
.gitlab-ci.yml

@@ -1,9 +1,14 @@
 image: ruby:2.3
 
+variables:
+  JEKYLL_ENV: production
+
+before_script:
+  - bundle install
+
 test:
   stage: test
   script:
-  - bundle
   - bundle exec jekyll build -d test
   artifacts:
     paths:
@@ -14,7 +19,6 @@ test:
 pages:
   stage: deploy
   script:
-  - bundle
   - bundle exec jekyll build -d public
   artifacts:
     paths:

+ 3 - 0
README.md

@@ -56,6 +56,9 @@ defined in [`.gitlab-ci.yml`](.gitlab-ci.yml):
 ```
 image: ruby:2.3
 
+variables:
+  JEKYLL_ENV: production
+
 pages:
   script:
   - gem install jekyll