Merge pull request #12 from willwillis/node #15
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: Build Website and Deploy via FTP | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' # Specify the Node.js version | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build project | |
| run: npm run build | |
| - name: Deploy to FTP | |
| uses: SamKirkland/FTP-Deploy-Action@4.3.1 | |
| with: | |
| server: ${{ secrets.FTP_HOST }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| local-dir: ./build/ | |
| protocol: ftp | |
| server-dir: ${{ secrets.FTP_DESTINATION }} |