Skip to content
Snippets Groups Projects

feat: use rules instead of only in gitlab-ci script

Merged Jacek Lebioda requested to merge 30-use-rules-instead-of-only into latest
1 file
+ 7
4
Compare changes
  • Side-by-side
  • Inline
+ 7
4
@@ -25,8 +25,9 @@ test:
@@ -25,8 +25,9 @@ test:
# This will actually deploy the web site when pushing to master
# This will actually deploy the web site when pushing to master
pages:
pages:
stage: deploy
stage: deploy
only:
rules:
- master
# Run only on branch named "latest"
 
- if: $CI_COMMIT_BRANCH == "latest"
script:
script:
- mv build public
- mv build public
- echo "Your website is available at $CI_PAGES_URL"
- echo "Your website is available at $CI_PAGES_URL"
@@ -41,5 +42,7 @@ release:
@@ -41,5 +42,7 @@ release:
script:
script:
- mkdir -p ~/.gem && echo "$API_KEY_BASE64" | base64 --decode > ~/.gem/credentials && chmod 0600 ~/.gem/credentials
- mkdir -p ~/.gem && echo "$API_KEY_BASE64" | base64 --decode > ~/.gem/credentials && chmod 0600 ~/.gem/credentials
- gem build jekyll-theme-lcsb-default.gemspec && gem push jekyll-theme-lcsb-default*.gem
- gem build jekyll-theme-lcsb-default.gemspec && gem push jekyll-theme-lcsb-default*.gem
only:
rules:
- tags
# Run only on master...
 
- if: $CI_COMMIT_TAG
 
Loading