[CI/CD] fix non-accessable files
This commit is contained in:
parent
097ab26112
commit
779202dd7f
1 changed files with 9 additions and 10 deletions
|
@ -5,30 +5,29 @@ pipeline:
|
||||||
- pacman -Syu --noconfirm hugo git
|
- pacman -Syu --noconfirm hugo git
|
||||||
- hugo --destination /woodpecker/build/ --minify --cleanDestinationDir
|
- hugo --destination /woodpecker/build/ --minify --cleanDestinationDir
|
||||||
|
|
||||||
prepare-upload:
|
upload:
|
||||||
image: archlinux
|
image: archlinux
|
||||||
commands:
|
commands:
|
||||||
|
- pacman -Syu --noconfirm openssh rsync
|
||||||
- mkdir -p /root/.ssh
|
- mkdir -p /root/.ssh
|
||||||
- echo "$SSH_KEY" > /root/.ssh/id_ed25519
|
- echo "$SSH_KEY" > /root/.ssh/id_ed25519
|
||||||
- chmod 700 /root/.ssh/id_ed25519
|
- chmod 700 /root/.ssh/id_ed25519
|
||||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
|
||||||
secrets: [ ssh_key ]
|
|
||||||
|
|
||||||
upload-main:
|
|
||||||
image: archlinux
|
|
||||||
commands:
|
|
||||||
- pacman -Syu --noconfirm openssh rsync
|
|
||||||
- rsync -rv --delete -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/ woodpecker@$SSH_HOST:/home/woodpecker/build/vrifox.cc/ --checksum
|
||||||
secrets: [ ssh_port, ssh_host ]
|
secrets: [ ssh_key, ssh_port, ssh_host ]
|
||||||
when:
|
when:
|
||||||
branch: main
|
branch: main
|
||||||
|
|
||||||
upload-cicd:
|
upload:
|
||||||
image: archlinux
|
image: archlinux
|
||||||
commands:
|
commands:
|
||||||
- pacman -Syu --noconfirm openssh rsync
|
- 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/ woodpecker@$SSH_HOST:/home/woodpecker/build/vrifox.cc-cicd/ --checksum
|
- rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ woodpecker@$SSH_HOST:/home/woodpecker/build/vrifox.cc-cicd/ --checksum
|
||||||
secrets: [ ssh_port, ssh_host ]
|
secrets: [ ssh_key, ssh_port, ssh_host ]
|
||||||
when:
|
when:
|
||||||
branch: cicd
|
branch: cicd
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue