Browse Source

use lftp for deployment

main
yova 1 year ago
parent
commit
491cc7c842
  1. 4
      .gitlab-ci.yml
  2. 2
      README.md
  3. 2
      resources/_gen/assets/sass/sass/style.sass_48b060fe05b0a273d182ef83c0605941.content
  4. 2
      resources/_gen/assets/sass/sass/style.sass_48b060fe05b0a273d182ef83c0605941.json

4
.gitlab-ci.yml

@ -29,11 +29,11 @@ deploy:
only:
- main
before_script:
- apk add --no-cache rsync openssh
- apk add --no-cache lftp openssh
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY" >> ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
script:
- cd public
- rsync -rz -e 'ssh -p 1006' . gh0st@135.125.132.92:/var/www/$HUGO_DOMAIN
- lftp -u $SFTP_USER, sftp://135.125.132.92:1006 -e "cd site;glob -a rm -r *;mirror -R;bye"

2
README.md

@ -9,3 +9,5 @@ git submodule update --init --recursive --remote
hugo serve
```
`$SSH_PRIVATE_KEY` and `$SFTP_USER` need to be set in CI/CD pipelines.

2
resources/_gen/assets/sass/sass/style.sass_48b060fe05b0a273d182ef83c0605941.content

File diff suppressed because one or more lines are too long

2
resources/_gen/assets/sass/sass/style.sass_48b060fe05b0a273d182ef83c0605941.json

@ -1 +1 @@
{"Target":"sass/style.min.2b2ded605b9bab9c355d6551df0997d50ac3d0eb1e885d3221bbaf66414f72cf.css","MediaType":"text/css","Data":{"Integrity":"sha256-Ky3tYFubq5w1XWVR3wmX1QrD0OseiF0yIbuvZkFPcs8="}}
{"Target":"sass/style.min.ac3b29eee9e254302a04aca44260f19f19da7d1d3a16e2dbb3e8a152ad617046.css","MediaType":"text/css","Data":{"Integrity":"sha256-rDsp7uniVDAqBKykQmDxnxnafR06FuLbs+ihUq1hcEY="}}
Loading…
Cancel
Save