mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2024-11-28 23:39:25 +01:00
.gitlab-ci.yml: attempt to import pre-commit
This commit is contained in:
parent
e6e2a75d18
commit
51f5cab76c
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ _site
|
|||||||
*~
|
*~
|
||||||
keys.txt.asc
|
keys.txt.asc
|
||||||
.bundle
|
.bundle
|
||||||
|
.cache/**
|
||||||
.jekyll-cache
|
.jekyll-cache
|
||||||
.jekyll-metadata
|
.jekyll-metadata
|
||||||
vendor/
|
vendor/
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
# from https://gitlab.com/pages/jekyll/-/blob/master/.gitlab-ci.yml
|
image: python:alpine
|
||||||
image: ruby:latest
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
JEKYLL_ENV: production
|
JEKYLL_ENV: production
|
||||||
LC_ALL: C.UTF-8
|
LC_ALL: en_US.utf8
|
||||||
|
TERM: dumb
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- ${PRE_COMMIT_HOME}
|
||||||
|
- ${CI_PROJECT_DIR}/bundle
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- gem install bundler
|
- apk install --no-cache ruby-bundler
|
||||||
- bundle install
|
- bundle install
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@ -28,3 +33,13 @@ pages:
|
|||||||
- public
|
- public
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
||||||
|
|
||||||
|
gitlab-ci-pre-commit:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- apk add --no-cache git gcc musl-dev go
|
||||||
|
- pip install pre-commit
|
||||||
|
script:
|
||||||
|
- pre-commit run --all-files --show-diff-on-failure
|
||||||
|
variables:
|
||||||
|
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
|
||||||
|
Loading…
Reference in New Issue
Block a user