2018-03-12 20:31:14 +01:00
|
|
|
|
2021-04-21 15:33:28 +02:00
|
|
|
image: node:12.22.1
|
2018-03-12 20:31:14 +01:00
|
|
|
|
2019-03-24 15:23:05 +01:00
|
|
|
hexo:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
|
|
|
- npm install gulp -g
|
|
|
|
- npm install hexo-cli -g
|
|
|
|
- npm install
|
2018-03-12 20:31:14 +01:00
|
|
|
script:
|
2019-03-24 15:23:05 +01:00
|
|
|
- gulp build --cwd ./themes/starter
|
|
|
|
- hexo generate
|
2018-03-12 20:31:14 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-03-24 15:23:05 +01:00
|
|
|
- public/
|
2018-03-15 03:06:18 +01:00
|
|
|
cache:
|
|
|
|
paths:
|
2019-03-24 15:23:05 +01:00
|
|
|
- node_modules/
|
2018-03-15 03:06:18 +01:00
|
|
|
key: project
|
2019-03-24 15:23:05 +01:00
|
|
|
only:
|
2020-10-12 20:52:48 +02:00
|
|
|
- main
|
2019-03-24 15:23:05 +01:00
|
|
|
|
|
|
|
htmlproofer:
|
|
|
|
stage: test
|
|
|
|
image: bobik/html-proofer-docker:gitlabci # fork of 18fgsa/html-proofer
|
2019-03-24 18:15:00 +01:00
|
|
|
only:
|
2019-04-01 14:43:26 +02:00
|
|
|
variables:
|
|
|
|
- $CI_COMMIT_MESSAGE =~ /htmlproofer/
|
2019-03-24 15:23:05 +01:00
|
|
|
script:
|
2019-03-24 18:27:15 +01:00
|
|
|
- htmlproofer public/ --url-ignore "/fediverse.network/,/howto.disroot.org/,/f-droid.org/" --external-only --checks-to-ignore ScriptCheck,ImageCheck
|
2019-03-24 15:23:05 +01:00
|
|
|
dependencies:
|
|
|
|
- hexo
|
2018-03-15 03:06:18 +01:00
|
|
|
|
2019-03-24 15:23:05 +01:00
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
variables:
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public/
|
|
|
|
dependencies:
|
|
|
|
- hexo
|
|
|
|
script:
|
|
|
|
- echo 'Deploying...'
|
2018-03-12 20:31:14 +01:00
|
|
|
only:
|
2020-10-12 20:52:48 +02:00
|
|
|
- main
|
2018-10-17 22:27:04 +02:00
|
|
|
|
|
|
|
cert-renewal:
|
|
|
|
only:
|
|
|
|
- schedules
|
|
|
|
variables:
|
|
|
|
CERTBOT_RENEWAL_GIT_TOKEN: $CERTBOT_RENEWAL_GIT_TOKEN
|
|
|
|
script:
|
2019-04-02 20:41:14 +02:00
|
|
|
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
|
2018-10-17 22:27:04 +02:00
|
|
|
- apt-get update
|
2019-04-02 20:41:14 +02:00
|
|
|
- apt-get install certbot -t stretch-backports -y
|
2018-10-17 22:27:04 +02: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
|