-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.gitlab-ci.yml
33 lines (33 loc) · 923 Bytes
/
.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
image: python:alpine
pre-commit:
stage: build
before_script:
- apk add --no-cache git gcc musl-dev
- pip install pre-commit
script:
- pre-commit run --all-files --hook-stage manual
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
TERM: dumb
cache:
paths:
- ${PRE_COMMIT_HOME}
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
pages:
stage: deploy
before_script:
- apk add --no-cache brotli
script:
- script/build-js0.sh
- script/generate-site.sh
- find dist -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|json\|dz\|index\|csv\)$\|.*/LICENSE(\.data)?$' -exec gzip -9 -f -k {} \;
- find dist -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|json\|dz\|index\|csv\)$\|.*/LICENSE(\.data)?$' -exec brotli -f -k {} \;
- mkdir -p public
- mv -t public dist/*
artifacts:
paths:
- public
expire_in: 1 day
only:
- master