-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
39 lines (35 loc) · 976 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
34
35
36
37
38
39
image: ruby:2.7
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
before_script:
- apt-get update -y
- apt-get install curl rsync -y
- nvmversion=$(curl --silent "https://api.github.com/repos/nvm-sh/nvm/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
- curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$nvmversion/install.sh" | bash
- apt-get install build-essential -y
- source /root/.bashrc
- nvm install 14.15.1
- chmod +x setup.sh && bash setup.sh
test:
stage: test
script:
- bundle exec jekyll build -d test
artifacts:
paths:
- test
except:
- master
pages:
stage: deploy
script:
- bundle exec jekyll build --trace -d public
- find public -type f -regex '.*\.\(html\)$' -exec npm run minify-html {} \;
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -exec gzip -f -k {} \;
artifacts:
when: always
paths:
- _data/api_fetch
- public
only:
- master