deblan.io-murph/.woodpecker/deploy.yml
Simon Vieille 850ebff7c0
Some checks are pending
ci/woodpecker/push/build Pipeline is pending
fix ci syntax
2023-09-29 16:02:54 +02:00

26 lines
877 B
YAML

variables:
- &volumes
- /data/deblan/deblan.io-murph:/data/deblan/deblan.io-murph
when:
event: [deployment]
steps:
app-deploy:
image: deblan/php:8.1
secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
volumes: *volumes
commands:
- apt-get update && apt-get -y install rsync openssh-client
- cd "/data/deblan/deblan.io-murph/$CI_COMMIT_SHA"
- mkdir "$HOME/.ssh"
- echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519"
- chmod 700 "$HOME/.ssh"
- chmod 600 "$HOME/.ssh/id_ed25519"
- composer global require andres-montanez/magallanes
- cp .mage.yml.dist .mage.yml
- sed -i "s/ssh_user/$SSH_USER/g" .mage.yml
- sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml
- sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml
- /root/.config/composer/vendor/bin/mage deploy "$CI_BUILD_DEPLOY_TARGET"