website/.gitlab-ci.yml

23 lines
692 B
YAML
Raw Normal View History

2024-08-15 10:06:29 +03:00
image: debian
stages:
2024-08-15 11:15:41 +03:00
- deploy
2024-08-15 11:15:41 +03:00
deploy:
stage: deploy
script:
2024-08-15 11:15:41 +03:00
- apt-get update
- apt-get install -y rsync openssh-client hugo
2024-08-15 11:50:10 +03:00
- git submodule init
- git submodule update --recursive
- hugo
- mkdir -p ~/.ssh
- echo "$PRIVKEY" | base64 -d > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -p 69 107.189.28.28 >> ~/.ssh/known_hosts
- ssh -i ~/.ssh/id_rsa -p 69 gitlab@107.189.28.28 "rm -rf /var/www/fzorb.xyz/*"
2024-08-15 10:15:05 +03:00
- rsync -avzh ./public/ -e "ssh -i ~/.ssh/id_rsa -p 69" gitlab@107.189.28.28:/var/www/fzorb.xyz
- ssh -i ~/.ssh/id_rsa -p 69 gitlab@107.189.28.28 "chmod 755 -R /var/www/fzorb.xyz"
only:
- main