Pruebas de jest #1
This file contains 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 Hostinger test | |
on: | |
push: | |
branches: | |
- main # Ajusta según la rama que quieres desplegar | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Ajusta la versión si es necesario | |
- name: Install dependencies with Yarn | |
run: yarn install | |
- name: Build project | |
run: yarn build # Construye la carpeta dist | |
- name: Install lftp | |
run: sudo apt-get install lftp | |
- name: Deploy to Hostinger via FTPS (with exclusions) | |
env: | |
FTP_HOST: ${{ secrets.FTP_HOST }} | |
FTP_USERNAME: ${{ secrets.FTP_USERNAME }} | |
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} | |
run: | | |
lftp -e " | |
set ssl:verify-certificate no; | |
set ftp:ssl-force true; | |
set ftp:ssl-protect-data true; | |
set ftp:ssl-protect-list true; | |
set ftp:ssl-allow yes; | |
open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; | |
mirror -R --only-newer --exclude-glob admin --exclude-glob oldcosas --exclude .htaccess ./dist /public_html; | |
quit | |
" | |