Script pour le déploiement

This commit is contained in:
Colin Maudry
2025-09-24 09:50:36 +02:00
parent e41dbe772c
commit a41b70d5af
2 changed files with 17 additions and 2 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: ${{ github.ref_name }} environment: ${{ github.ref_name }}
steps: steps:
- name: Checkout repositorypu - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up SSH key - name: Set up SSH key
@@ -40,4 +40,4 @@ jobs:
key: ${{ secrets.ARTIFACT_SSH_KEY }} key: ${{ secrets.ARTIFACT_SSH_KEY }}
passphrase: ${{ secrets.SSH_PSWD }} passphrase: ${{ secrets.SSH_PSWD }}
command_timeout: 5m command_timeout: 5m
script: ${{ secrets.APP_PATH }}/deploy.sh script: ${{ secrets.APP_PATH }}/deploy.sh ${{ env.APP_NAME }}
Executable
+15
View File
@@ -0,0 +1,15 @@
#!bin/bash
# Utilisé principalement avec les Github Actions
# cf. .github/workflows/deploy.yaml
appname = "$1"
systemctl stop $appname
cd /var/www/$appname
git pull
source .venv/bin/activate
pip install .
deactivate
chown -R $appname:www-data *
systemctl start $appname