[CI/CD] add ssh preparation
This commit is contained in:
parent
819404a44c
commit
517b52134f
1 changed files with 9 additions and 4 deletions
|
@ -5,14 +5,19 @@ pipeline:
|
|||
- pacman -Syu hugo
|
||||
- hugo --destination /woodpecker/build/vrifox.cc/ --minify --cleanDestinationDir
|
||||
|
||||
prepare-ssh:
|
||||
image: archlinux
|
||||
commands:
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH-KEY" > ~/.ssh/id_25519
|
||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||
secrets: ssh-key
|
||||
|
||||
upload:
|
||||
image: archlinux
|
||||
commands:
|
||||
- pacman -Syu openssh rsync
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$SSH-KEY" > ~/.ssh/id_25519
|
||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||
- rsync -rv -e "ssh -p $SSH-PORT -i ~/.ssh/id_ed25519" /woodpecker/build/ woodpecker@$SSH-HOST:/home/woodpecker/build/vrifox.cc/ --checksum
|
||||
secrets: [ ssh-key, ssh-port, ssh-host ]
|
||||
secrets: [ ssh-port, ssh-host ]
|
||||
|
||||
branches: main
|
Loading…
Reference in a new issue