2023-05-22 18:50:53 +02:00
|
|
|
image: alpine:latest
|
2022-05-01 21:18:34 +02:00
|
|
|
|
|
|
|
variables:
|
|
|
|
JEKYLL_ENV: production
|
2023-05-22 18:14:58 +02:00
|
|
|
LC_ALL: en_US.utf8
|
|
|
|
TERM: dumb
|
|
|
|
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- ${PRE_COMMIT_HOME}
|
2024-05-29 19:40:24 +02:00
|
|
|
- ${CI_PROJECT_DIR}/vendor
|
2022-05-01 21:18:34 +02:00
|
|
|
|
|
|
|
before_script:
|
2024-06-19 07:19:44 +02:00
|
|
|
- apk add --no-cache ruby ruby-dev ruby-bundler make gcc g++ musl-dev
|
|
|
|
build-base libffi-dev libxml2-dev
|
2022-05-01 21:18:34 +02:00
|
|
|
- bundle install
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
script:
|
2023-02-22 19:28:38 +01:00
|
|
|
- bundle exec jekyll build -d test
|
2022-05-01 21:18:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2023-02-22 19:28:38 +01:00
|
|
|
- test
|
2022-05-01 21:18:34 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
|
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
2023-02-22 19:28:38 +01:00
|
|
|
- bundle exec jekyll build -d public
|
2022-05-01 21:18:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2023-02-22 19:28:38 +01:00
|
|
|
- public
|
2022-05-01 21:18:34 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
2023-05-22 18:14:58 +02:00
|
|
|
|
|
|
|
gitlab-ci-pre-commit:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
2024-06-19 07:19:44 +02:00
|
|
|
- apk add --no-cache python3 python3-dev py3-pip py3-wheel git gcc musl-dev
|
|
|
|
bash nodejs-current npm ruby ruby-bundler
|
2024-01-11 20:58:31 +01:00
|
|
|
- pip install pre-commit --break-system-packages
|
2023-05-22 18:14:58 +02:00
|
|
|
script:
|
|
|
|
- pre-commit run --all-files --show-diff-on-failure
|
|
|
|
variables:
|
|
|
|
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|