2021-02-09 03:22:48 +00:00
|
|
|
image: shockrah/website:1.3
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
variables:
|
|
|
|
SHOPTS: "-o StrictHostKeyChecking=no"
|
|
|
|
|
2020-10-26 07:51:40 +00:00
|
|
|
|
2020-10-30 03:39:28 +00:00
|
|
|
before_script:
|
2020-10-30 03:38:47 +00:00
|
|
|
- eval $(ssh-agent -s)
|
|
|
|
- echo "${SSH_PRIVATE_KEY}" | ssh-add - > /dev/null
|
|
|
|
- mkdir -p ~/.ssh/
|
|
|
|
- chmod 700 ~/.ssh/
|
2020-10-26 07:51:40 +00:00
|
|
|
|
2021-02-09 03:22:48 +00:00
|
|
|
build-site:
|
2021-08-14 22:15:37 +00:00
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
|
2020-10-26 07:51:40 +00:00
|
|
|
stage: build
|
2021-02-09 03:43:48 +00:00
|
|
|
|
2020-10-26 07:51:40 +00:00
|
|
|
script:
|
2021-02-09 03:22:48 +00:00
|
|
|
bash ./build.sh
|
|
|
|
|
2021-02-09 03:43:48 +00:00
|
|
|
artifacts:
|
|
|
|
expire_in: 10 mins
|
|
|
|
paths: ["./.mirror"]
|
|
|
|
|
2021-02-09 03:22:48 +00:00
|
|
|
deploy-vps:
|
2021-08-14 22:15:37 +00:00
|
|
|
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:
|
2021-08-14 22:15:37 +00:00
|
|
|
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
|
2021-02-09 03:49:08 +00:00
|
|
|
- bash upload.sh -M
|
2021-02-09 03:22:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|