ci: add base of deploy
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2022-12-28 14:04:58 +01:00
parent 646d6799b1
commit c6e9a61f2a
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 8 additions and 8 deletions

View file

@ -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' }

View file

@ -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: