Add continous deployment
This commit is contained in:
parent
2982f87c17
commit
76c0e9bb3b
1 changed files with 19 additions and 9 deletions
|
@ -1,13 +1,23 @@
|
||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: recursive
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- apk add --no-cache openssh
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
- mkdir ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
- echo "$SSH_KNOWN_HOSTS" | tr -d '\r' >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: silex/emacs:27.2-alpine-ci
|
image: silex/emacs:27.2-alpine-ci
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- emacs -Q --script .build/ox-hugo-build.el
|
- emacs -Q --script .build/ox-hugo-build.el
|
||||||
- apk add --no-cache hugo
|
- apk add --no-cache hugo rsync
|
||||||
- hugo
|
- hugo
|
||||||
|
- rsync --archive --verbose --chown=gitlab-ci:www-data --delete --progress -e"ssh -p "$SSH_PORT"" public/ "$SSH_USER"@mmk2410.org:/var/www/mmk2410.org/
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
Loading…
Reference in a new issue