1
0
mirror of https://git.feneas.org/feneas/fediverse.git synced 2024-12-23 08:37:56 +01:00
guida-fediverso/.gitlab-ci.yml

65 lines
1.5 KiB
YAML
Raw Normal View History

2018-03-12 20:31:14 +01:00
2019-01-15 00:01:54 +01:00
image: node:10.15.0
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:
- master
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:
2019-03-24 15:23:05 +01:00
- master
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
2019-01-15 00:01:54 +01:00
- chmod +x ./letsencrypt_cleanup.sh
2018-10-17 22:27:04 +02:00
- ./letsencrypt_generate.sh