2022-10-19 02:59:48 +00:00
|
|
|
image: node:16-alpine3.14
|
|
|
|
|
|
|
|
cache:
|
|
|
|
key: "${CI_COMMIT_BRANCH}_${CI_JOB_NAME}_new"
|
|
|
|
paths:
|
|
|
|
- bin/node_modules/
|
|
|
|
|
|
|
|
splitter:
|
|
|
|
stage: deploy
|
|
|
|
before_script:
|
2022-10-19 03:05:12 +00:00
|
|
|
- apk add --no-cache git
|
2022-10-19 02:59:48 +00:00
|
|
|
- npm i -g pnpm
|
2022-10-19 03:23:37 +00:00
|
|
|
- npm i -g prettier
|
2022-10-19 02:59:48 +00:00
|
|
|
- pnpm i -r
|
|
|
|
- git config --global user.name "CI"
|
|
|
|
- git config --global user.email "ci@c7.pm"
|
|
|
|
script:
|
2023-02-04 21:04:14 +00:00
|
|
|
- rm -rf modular
|
|
|
|
- mkdir modular
|
2022-10-19 02:59:48 +00:00
|
|
|
- node bin/splitter.js xmc.user.css modular
|
2022-10-19 03:23:37 +00:00
|
|
|
- prettier --write modular/**/*.css
|
2022-10-19 03:31:19 +00:00
|
|
|
- prettier --write modular/*.css
|
2022-10-19 02:59:48 +00:00
|
|
|
- git add modular
|
|
|
|
- git commit -m "Make Modular"
|
|
|
|
- git push "https://${GITLAB_USER_LOGIN}:${CI_GIT_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" "HEAD:${CI_DEFAULT_BRANCH}"
|
|
|
|
only:
|
|
|
|
changes:
|
|
|
|
- xmc.user.css
|
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
script:
|
|
|
|
- mkdir public
|
|
|
|
- cp -r modular public
|
|
|
|
- cp xmc.user.css public
|
2022-10-19 16:40:37 +00:00
|
|
|
- sed -i "s/@version 0.0.0/@version 0+${CI_COMMIT_SHA:0:8}/" public/xmc.user.css
|
2022-10-19 03:00:45 +00:00
|
|
|
artifacts:
|
2022-10-19 02:59:48 +00:00
|
|
|
paths:
|
|
|
|
- public
|
2022-10-19 03:05:12 +00:00
|
|
|
only:
|
2022-10-19 02:59:48 +00:00
|
|
|
changes:
|
2022-10-19 03:05:12 +00:00
|
|
|
- modular/*
|