ci: add base of deploy
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
646d6799b1
commit
c6e9a61f2a
|
@ -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' }
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue