fix: update pnpm installation step to ignore scripts and remove unnec… #335
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Akevas.com | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: hostinger | |
| steps: | |
| - name: Checkout Code Akevas | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Configure pnpm # ← ajoute cette étape | |
| run: pnpm config set ignore-scripts true | |
| - name: Install Dependancies | |
| run: pnpm install --ignore-scripts | |
| - name: Build App | |
| # Ajout du nettoyage du dossier dist avant le build | |
| run: rm -rf dist && pnpm run build | |
| - name: Copy .htaccess to dist/ | |
| # Au lieu de faire des 'echo', on copie ton fichier complet qui est à la racine | |
| run: cp .htaccess ./dist/.htaccess | |
| - name: Deploy via SSH (Rsync) | |
| uses: Burnett01/rsync-deployments@7.0.1 | |
| with: | |
| # L'option --delete va supprimer les vieux fichiers JS sur le serveur (Génial !) | |
| # Mais rsync ne touchera pas aux dossiers 'api', 'seller' (parent) et 'delivery' | |
| switches: -avzr --delete --exclude='api' --exclude='seller' --exclude='delivery' -e "ssh -p ${{ secrets.PORT }} -o StrictHostKeyChecking=no" | |
| path: ./dist/ | |
| remote_path: domains/akevas.com/public_html/ | |
| remote_host: ${{ secrets.HOST }} | |
| remote_user: ${{ secrets.USERNAME }} | |
| remote_key: ${{ secrets.SSH_KEY }} | |
| remote_port: ${{ secrets.PORT }} |