Build PWA
Some checks failed
roulette / build (push) Successful in 9m40s
roulette / Deploy (push) Failing after 7s

This commit is contained in:
Melaine Gérard 2024-09-16 13:49:33 +02:00
parent 275b17b117
commit 324469816d
No known key found for this signature in database
GPG Key ID: 89A9588EB2726A53

View File

@ -32,3 +32,19 @@ jobs:
# On regarde si les fichiers sont là # On regarde si les fichiers sont là
- name: List files - name: List files
run: ls -l ./dist run: ls -l ./dist
# On installe Rsync
- name: Install Rsync
run: sudo apt-get install rsync -y
# On ajoute la clé SSH
- name: Add SSH key
run: echo "$DEPLOY_KEY" > $HOME/.ssh/test_private_key && chmod 600 $HOME/.ssh/test_private_key
# On utilise Rsync pour copier les fichiers (On fait en sorte de supprimer les ancien fichiers)
- name: Deploy files
run: rsync -av -e "ssh -i $HOME/.ssh/test_private_key" --delete ./dist/ $DEPLOY_URL
# On supprime la clé SSH
- name: Remove SSH key
run: rm $HOME/.ssh/test_private_key
variables:
DEPLOY_URL: ${{ secrets.DEPLOY_URL }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}