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.
This commit is contained in:
parent
8386052858
commit
2d05019aa6
1 changed files with 2 additions and 6 deletions
|
@ -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:"
|
||||
|
|
Loading…
Reference in a new issue