1
0
mirror of https://github.com/Mikaela/cv.git synced 2024-11-25 18:09:24 +01:00
cv/.gitlab-ci.yml

48 lines
1.0 KiB
YAML
Raw Normal View History

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