chore(workflow): setup workflow for deployment #1
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 React App to Hostinger via FTP | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: β¬οΈ Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: π Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: π¦ Install dependencies | |
| run: npm install | |
| - name: π Build project | |
| run: npm run build | |
| - name: π Deploy to Hostinger via FTP | |
| uses: SamKirkland/[email protected] | |
| with: | |
| server: ${{ secrets.FTP_HOST }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| local-dir: build/ | |
| server-dir: ${{ secrets.FTP_TARGET_DIR }}/ |