diff --git a/.mage.yml.dist b/.mage.yml.dist index 7df937a..a7e18ea 100644 --- a/.mage.yml.dist +++ b/.mage.yml.dist @@ -1,10 +1,10 @@ magephp: environments: prod: - user: {ssh_user} + user: ssh_user from: ./ - to: {app_directory} - host_path: {app_directory} + to: app_directory + host_path: app_directory rsync: '-avz --delete' exclude: - "/.git" @@ -19,7 +19,7 @@ magephp: - "/var/log/*" - "/public/media" hosts: - - {ssh_host} + - ssh_host on-deploy: - exec: { cmd: 'make clean', desc: 'cache' } - exec: { cmd: 'make doctrine-migration', desc: 'migration' } diff --git a/.woodpecker.yml b/.woodpecker.yml index 97bcfe4..68b6885 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -35,7 +35,7 @@ pipeline: - yarn - npm run build - deploy: + deploy_prod: image: deblan/php:8.1 secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory] commands: @@ -45,9 +45,9 @@ pipeline: - 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 + - 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 - cat .mage.yml # - /root/.config/composer/vendor/bin/mage # when: