Fix CI: expand DEPLOY_PATH on server and use cp -r with trailing slash
Some checks failed
Deploy / deploy (push) Failing after 8s
Some checks failed
Deploy / deploy (push) Failing after 8s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
09afbff2fd
commit
e4d8479f88
1 changed files with 17 additions and 14 deletions
|
|
@ -54,21 +54,24 @@ jobs:
|
||||||
|
|
||||||
- name: Apply on server
|
- name: Apply on server
|
||||||
run: |
|
run: |
|
||||||
ssh -i ~/.ssh/id_ed25519 ${{ vars.USERNAME }}@${{ vars.HOST }} << 'ENDSSH'
|
ssh -i ~/.ssh/id_ed25519 ${{ vars.USERNAME }}@${{ vars.HOST }} "
|
||||||
echo "Copie des fichiers vers $DEPLOY_PATH..."
|
set -e
|
||||||
sudo cp -r /tmp/web2print-deploy/config $DEPLOY_PATH/
|
DEPLOY_PATH=/var/www/web2print
|
||||||
sudo cp -r /tmp/web2print-deploy/src $DEPLOY_PATH/
|
|
||||||
sudo cp -r /tmp/web2print-deploy/public $DEPLOY_PATH/
|
|
||||||
|
|
||||||
echo "Configuration des permissions..."
|
echo 'Copie des fichiers...'
|
||||||
sudo chown -R www-data:www-data $DEPLOY_PATH
|
sudo cp -r /tmp/web2print-deploy/config/. \$DEPLOY_PATH/config/
|
||||||
sudo chmod -R 755 $DEPLOY_PATH
|
sudo cp -r /tmp/web2print-deploy/src/. \$DEPLOY_PATH/src/
|
||||||
sudo chmod -R 775 $DEPLOY_PATH/logs
|
sudo cp -r /tmp/web2print-deploy/public/. \$DEPLOY_PATH/public/
|
||||||
sudo chmod -R 775 $DEPLOY_PATH/tmp
|
|
||||||
sudo chmod 640 $DEPLOY_PATH/config/config.php
|
|
||||||
|
|
||||||
echo "Nettoyage..."
|
echo 'Configuration des permissions...'
|
||||||
|
sudo chown -R www-data:www-data \$DEPLOY_PATH
|
||||||
|
sudo chmod -R 755 \$DEPLOY_PATH
|
||||||
|
sudo chmod -R 775 \$DEPLOY_PATH/logs
|
||||||
|
sudo chmod -R 775 \$DEPLOY_PATH/tmp
|
||||||
|
sudo chmod 640 \$DEPLOY_PATH/config/config.php
|
||||||
|
|
||||||
|
echo 'Nettoyage...'
|
||||||
rm -rf /tmp/web2print-deploy
|
rm -rf /tmp/web2print-deploy
|
||||||
|
|
||||||
echo "Deploiement termine avec succes!"
|
echo 'Deploiement termine avec succes!'
|
||||||
ENDSSH
|
"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue