From a273a9aac17c87fe0f719613972d4b33a8aa5ce7 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 18 Oct 2023 22:07:20 +0200 Subject: [PATCH] update deploy step --- .woodpecker/deploy.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index d84cf7c..f00577f 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -1,6 +1,6 @@ variables: - &volumes - - /data/deblan/deblan.io-murph:/data/deblan/deblan.io-murph + - /data/deblan/deblan.io-murph:/builds when: event: [deployment] @@ -9,19 +9,17 @@ skip_clone: true steps: app-deploy: - image: deblan/php:8.1 + image: deblan/mage 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" + - cd "/builds/$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_PIPELINE_DEPLOY_TARGET" + -mage deploy "$CI_PIPELINE_DEPLOY_TARGET"