blog/.gitlab-ci.yml

49 lines
810 B
YAML

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/
build-site:
stage: build
script:
bash ./build.sh
artifacts:
expire_in: 10 mins
paths: ["./.mirror"]
deploy-vps:
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:
stage: deploy
script:
# First the html
- bash upload.sh -h
# then we do the media files
- for file in $(find media);do \
if [ -f $file ];then \
bash upload.sh -m $file \
fi \
done