2018-03-12 19:31:14 +00:00
|
|
|
|
2020-02-27 00:44:34 +00:00
|
|
|
image: node:12.16.1
|
2018-03-12 19:31:14 +00:00
|
|
|
|
2019-03-24 14:23:05 +00:00
|
|
|
hexo:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
|
|
|
- npm install gulp -g
|
|
|
|
- npm install hexo-cli -g
|
|
|
|
- npm install
|
2018-03-12 19:31:14 +00:00
|
|
|
script:
|
2019-03-24 14:23:05 +00:00
|
|
|
- gulp build --cwd ./themes/starter
|
|
|
|
- hexo generate
|
2018-03-12 19:31:14 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-03-24 14:23:05 +00:00
|
|
|
- public/
|
2018-03-15 02:06:18 +00:00
|
|
|
cache:
|
|
|
|
paths:
|
2019-03-24 14:23:05 +00:00
|
|
|
- node_modules/
|
2018-03-15 02:06:18 +00:00
|
|
|
key: project
|
2019-03-24 14:23:05 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
htmlproofer:
|
|
|
|
stage: test
|
|
|
|
image: bobik/html-proofer-docker:gitlabci # fork of 18fgsa/html-proofer
|
2019-03-24 17:15:00 +00:00
|
|
|
only:
|
2019-04-01 12:43:26 +00:00
|
|
|
variables:
|
|
|
|
- $CI_COMMIT_MESSAGE =~ /htmlproofer/
|
2019-03-24 14:23:05 +00:00
|
|
|
script:
|
2019-03-24 17:27:15 +00:00
|
|
|
- htmlproofer public/ --url-ignore "/fediverse.network/,/howto.disroot.org/,/f-droid.org/" --external-only --checks-to-ignore ScriptCheck,ImageCheck
|
2019-03-24 14:23:05 +00:00
|
|
|
dependencies:
|
|
|
|
- hexo
|
2018-03-15 02:06:18 +00:00
|
|
|
|
2019-03-24 14:23:05 +00:00
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public/
|
|
|
|
dependencies:
|
|
|
|
- hexo
|
|
|
|
script:
|
|
|
|
- echo 'Deploying...'
|
2018-03-12 19:31:14 +00:00
|
|
|
only:
|
2019-03-24 14:23:05 +00:00
|
|
|
- master
|
2018-10-17 20:27:04 +00:00
|
|
|
|
|
|
|
cert-renewal:
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
variables:
|
|
|
|
CERTBOT_RENEWAL_GIT_TOKEN: $CERTBOT_RENEWAL_GIT_TOKEN
|
|
|
|
script:
|
2019-04-02 18:41:14 +00:00
|
|
|
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
|
2018-10-17 20:27:04 +00:00
|
|
|
- apt-get update
|
2019-04-02 18:41:14 +00:00
|
|
|
- apt-get install certbot -t stretch-backports -y
|
2018-10-17 20:27:04 +00:00
|
|
|
- apt-get install git curl -y
|
|
|
|
- export PATH=$PATH:$CI_PROJECT_DIR
|
|
|
|
- git config --global user.name $GITLAB_USER_LOGIN
|
|
|
|
- git config --global user.email $GITLAB_USER_EMAIL
|
|
|
|
- chmod +x ./letsencrypt_generate.sh
|
|
|
|
- chmod +x ./letsencrypt_authenticator.sh
|
|
|
|
- ./letsencrypt_generate.sh
|