mirror of
https://github.com/mikaela/mikaela.github.io/
synced 2024-11-25 05:49:23 +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
|
||||
.bundle
|
||||
.cache/**
|
||||
.jekyll-cache
|
||||
.jekyll-metadata
|
||||
vendor/
|
||||
|
@ -1,12 +1,17 @@
|
||||
# from https://gitlab.com/pages/jekyll/-/blob/master/.gitlab-ci.yml
|
||||
image: ruby:latest
|
||||
image: python:alpine
|
||||
|
||||
variables:
|
||||
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:
|
||||
- gem install bundler
|
||||
- apk install --no-cache ruby-bundler
|
||||
- bundle install
|
||||
|
||||
test:
|
||||
@ -28,3 +33,13 @@ pages:
|
||||
- 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 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