Compare commits
7 commits
cb936bd6b6
...
05b1d0a178
Author | SHA1 | Date | |
---|---|---|---|
05b1d0a178 | |||
8c5492ff5b | |||
779202dd7f | |||
097ab26112 | |||
22e7d68416 | |||
f61000cf28 | |||
92a7274641 |
1 changed files with 20 additions and 4 deletions
|
@ -3,16 +3,32 @@ pipeline:
|
|||
image: archlinux
|
||||
commands:
|
||||
- pacman -Syu --noconfirm hugo git
|
||||
- hugo --destination /woodpecker/build/vrifox.cc/ --minify --cleanDestinationDir
|
||||
- hugo --destination /woodpecker/build/ --minify --cleanDestinationDir
|
||||
|
||||
upload:
|
||||
upload-main:
|
||||
image: archlinux
|
||||
commands:
|
||||
- pacman -Syu --noconfirm openssh rsync
|
||||
- mkdir -p /root/.ssh
|
||||
- echo "$SSH_KEY" > /root/.ssh/id_ed25519
|
||||
- chmod 700 /root/.ssh/id_ed25519
|
||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
|
||||
- rsync -rv -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ woodpecker@$SSH_HOST:/home/woodpecker/build/vrifox.cc/ --checksum
|
||||
- rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc/ --checksum
|
||||
secrets: [ ssh_key, ssh_port, ssh_host ]
|
||||
when:
|
||||
branch: main
|
||||
|
||||
branches: main
|
||||
upload-cicd:
|
||||
image: archlinux
|
||||
commands:
|
||||
- pacman -Syu --noconfirm openssh rsync
|
||||
- mkdir -p /root/.ssh
|
||||
- echo "$SSH_KEY" > /root/.ssh/id_ed25519
|
||||
- chmod 700 /root/.ssh/id_ed25519
|
||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
|
||||
- rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/vrifox.cc-cicd/ --checksum
|
||||
secrets: [ ssh_key, ssh_port, ssh_host ]
|
||||
when:
|
||||
branch: cicd
|
||||
|
||||
branches: [ main, cicd ]
|
||||
|
|
Loading…
Reference in a new issue