-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
26 lines (26 loc) · 1.07 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
image: node:lts
before_script:
- yarn global add sass
pages:
script:
- mkdir -p versions/latest
- mkdir -p public
- cp `find versions -regextype egrep -type d -iregex 'versions/[0-9]+\..*' |
sort --version-sort | tail -1`/style.scss versions/latest/style.scss
- sass --style=compressed versions/latest/style.scss
versions/latest/style.min.css
- for major in $(find versions -regextype egrep -type d -iregex
'versions/[0-9]+\.[0-9]+.x' | awk -F '.' '{print substr($1,10)}' | sort
-n | uniq); do mkdir -p "versions/$major.x.x"; cp versions/$(find versions
-regextype egrep -type d -iregex "versions/$major\.[0-9]+.x" | awk -F '/'
'{print $2}' | sort --version-sort | tail -1)/style.scss
"versions/$major.x.x/style.scss"; sass --style=compressed
"versions/$major.x.x/style.scss" "versions/$major.x.x/style.min.css"; done
- mv index.html public/index.html
- mv star.svg public/star.svg
- mv versions public/versions
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH