mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2024-11-19 10:29:23 +01:00
46 lines
850 B
YAML
46 lines
850 B
YAML
image: python:alpine
|
|
|
|
variables:
|
|
JEKYLL_ENV: production
|
|
LC_ALL: en_US.utf8
|
|
TERM: dumb
|
|
|
|
cache:
|
|
paths:
|
|
- ${PRE_COMMIT_HOME}
|
|
- ${CI_PROJECT_DIR}/bundle
|
|
|
|
before_script:
|
|
- apk install --no-cache ruby-bundler
|
|
- bundle install
|
|
|
|
test:
|
|
stage: test
|
|
script:
|
|
- bundle exec jekyll build -d test
|
|
artifacts:
|
|
paths:
|
|
- test
|
|
rules:
|
|
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
|
|
|
|
pages:
|
|
stage: deploy
|
|
script:
|
|
- bundle exec jekyll build -d public
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
rules:
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
|
|
gitlab-ci-pre-commit:
|
|
stage: build
|
|
before_script:
|
|
- apk add --no-cache git gcc musl-dev bash
|
|
- pip install pre-commit
|
|
script:
|
|
- pre-commit run --all-files --show-diff-on-failure
|
|
variables:
|
|
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|