name: Build and Deploy Site on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup node uses: actions/setup-node@v1 with: node-version: 14.x - run: npm ci - run: npm run build --if-present - name: Deploy site uses: wlixcc/SFTP-Deploy-Action@v1.2.2 with: username: ${{ secrets.USERNAME }} server: ${{ secrets.HOST }} port: ${{ secrets.PORT }} ssh_private_key: ${{ secrets.KEY }} remote_path: "/html/sinsaludar.com" sftp_only: true