[ci] change pipeline to steps
All checks were successful
ci/woodpecker/push/hugo-build Pipeline was successful

This commit is contained in:
Vri 🌈 2023-11-25 19:38:13 +01:00
parent 1dd140f701
commit 86d79a746e
Signed by: vrifox
SSH key fingerprint: SHA256:7OLOvW+jmULkXpdl5rUWgid7WJQhOIEgj+4WP/PtCpI

View file

@ -1,4 +1,4 @@
pipeline: steps:
build-stable: build-stable:
image: code.cozy.town/vrifox/hugoci:latest image: code.cozy.town/vrifox/hugoci:latest
commands: commands:
@ -14,21 +14,19 @@ pipeline:
- 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
- rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/cozy.town/ --mkpath --checksum - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/cozy.town/ --mkpath --checksum
secrets: secrets:
- ssh_key - ssh_key
- ssh_port - ssh_port
- ssh_host - ssh_host
when: when:
branch: main branch: main
build-dev: build-dev:
image: code.cozy.town/vrifox/hugoci:latest image: code.cozy.town/vrifox/hugoci:latest
commands: commands:
- hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir - hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir
when: when:
branch: branch:
exclude: main exclude: main
upload-dev: upload-dev:
@ -40,10 +38,10 @@ pipeline:
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config - 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/cozy.town-dev/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/ --mkpath --checksum - rsync -rv --delete -e "ssh -p $SSH_PORT -i /root/.ssh/id_ed25519" /woodpecker/build/ caddy@$SSH_HOST:/var/lib/caddy/woodpecker/cozy.town-dev/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/ --mkpath --checksum
- echo "The preview is now available on https://dev.cozy.town/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" - echo "The preview is now available on https://dev.cozy.town/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/"
secrets: secrets:
- ssh_key - ssh_key
- ssh_port - ssh_port
- ssh_host - ssh_host
when: when:
branch: branch:
exclude: main exclude: main