diff options
| author | 2019-08-19 23:33:10 -0700 | |
|---|---|---|
| committer | 2019-08-19 23:35:54 -0700 | |
| commit | 2d05019aa60ff29776ac26da150628191049489a (patch) | |
| tree | af4faf7ec0af2043d365fce7244113d2ed5f75aa | |
| parent | 8386052858797203cb95bbdcf5ebd97d7b0f5681 (diff) | |
| download | emacs-config-2d05019aa60ff29776ac26da150628191049489a.tar.gz emacs-config-2d05019aa60ff29776ac26da150628191049489a.zip | |
Simplify deployment method
Using the File type from the Gitlab CI/CD pipeline options, specify the required
files on the command line directly instead of writing to them from a script. SSH
won’t accept the identity file specified (‘DEPLOY_KEY’) if its file permissions
are more permissive than 600.
| -rw-r--r-- | .gitlab-ci.yml | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c768a9d..dcef562 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,11 +40,7 @@ deploy: dependencies: - package before_script: - - mkdir ~/.ssh/ - - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa - - chmod 600 ~/.ssh/id_rsa - - echo -e "$SSH_CONFIG" > ~/.ssh/config - - echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts + - chmod 600 "$DEPLOY_KEY" - apk update && apk add rsync script: - - rsync -v -c -r --delete bin/ "elpa@ryuslash.org:" + - rsync -e "ssh -o \"UserKnownHostsFile $KNOWN_HOSTS\" -p 4511 -i $DEPLOY_KEY" -v -c -r --delete bin/ "elpa@ryuslash.org:" |
