From 324469816d91a363d89cb2d3186feb5e8d3dc81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Melaine=20G=C3=A9rard?= Date: Mon, 16 Sep 2024 13:49:33 +0200 Subject: [PATCH] :sparkles: Build PWA --- .gitea/workflows/build.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index fc1bbff..0871fee 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -31,4 +31,20 @@ jobs: path: ./dist # On regarde si les fichiers sont là - name: List files - run: ls -l ./dist \ No newline at end of file + 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 }}