blog/.gitlab-ci.yml

57 lines
791 B
YAML
Raw Normal View History

2021-02-09 03:22:48 +00:00
image: shockrah/website:1.3
stages:
- build
- deploy
variables:
SHOPTS: "-o StrictHostKeyChecking=no"
before_script:
- eval $(ssh-agent -s)
- echo "${SSH_PRIVATE_KEY}" | ssh-add - > /dev/null
- mkdir -p ~/.ssh/
- chmod 700 ~/.ssh/
2021-02-09 03:22:48 +00:00
build-site:
only:
refs:
- master
stage: build
script:
2021-02-09 03:22:48 +00:00
bash ./build.sh
artifacts:
expire_in: 10 mins
paths: ["./.mirror"]
2021-02-09 03:22:48 +00:00
deploy-vps:
only:
refs:
- master
2021-02-09 03:22:48 +00:00
stage: deploy
script:
- ssh $SHOPTS root@shockrah.xyz "rm -rf /var/www/website"
- scp $SHOPTS -r .mirror root@shockrah.xyz:/var/www/website/
deploy-neocities:
only:
refs:
- master
2021-02-09 03:22:48 +00:00
stage: deploy
script:
# First the html
- bash upload.sh -h
# then we do the media files
- bash upload.sh -M
2021-02-09 03:22:48 +00:00