-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
47 lines (41 loc) · 1 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
image: alpine:latest
variables:
JEKYLL_ENV: production
LC_ALL: en_US.utf8
TERM: dumb
cache:
paths:
- ${PRE_COMMIT_HOME}
- ${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:
- 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 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