use different directory structure
All checks were successful
ci/woodpecker/push/hugo-build Pipeline was successful

This commit is contained in:
Vri 🌈 2023-05-17 17:57:02 +02:00
parent 98c2d2c164
commit a29261b5c0
Signed by: vrifox
GPG key ID: D40098E5B60B2197

View file

@ -4,15 +4,7 @@ pipeline:
commands: commands:
- hugo --destination /woodpecker/build/ --minify --cleanDestinationDir - hugo --destination /woodpecker/build/ --minify --cleanDestinationDir
when: when:
branch: [ main ] branch: main
build-dev:
image: code.cozy.town/vrifox/hugoci:latest
commands:
- hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir
when:
branch:
exclude: [ main ]
upload-stable: upload-stable:
image: code.cozy.town/vrifox/hugoci:latest image: code.cozy.town/vrifox/hugoci:latest
@ -22,9 +14,22 @@ 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/vrifox.cc/ --mkpath --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/ --mkpath --checksum
secrets: [ ssh_key, ssh_port, ssh_host ] secrets:
- ssh_key
- ssh_port
- ssh_host
when: when:
branch: [ main ] branch: main
build-dev:
image: code.cozy.town/vrifox/hugoci:latest
commands:
- hugo --destination /woodpecker/build/ --baseURL "https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" --cleanDestinationDir
when:
branch:
exclude: main
upload-dev: upload-dev:
image: code.cozy.town/vrifox/hugoci:latest image: code.cozy.town/vrifox/hugoci:latest
@ -35,7 +40,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/vrifox.cc-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/vrifox.cc-dev/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/ --mkpath --checksum
- echo "The preview is now available on https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/" - echo "The preview is now available on https://dev.vrifox.cc/${CI_COMMIT_BRANCH}/${CI_COMMIT_SHA}/"
secrets: [ ssh_key, ssh_port, ssh_host ] secrets:
- ssh_key
- ssh_port
- ssh_host
when: when:
branch: branch:
exclude: [ main ] exclude: main