on: push
name: 🚀 Deploy website on push
jobs:
  web-deploy:
    name: 🎉 Deploy
    runs-on: ubuntu-22.04
    steps:
    - name: 🚚 Get latest code
      uses: actions/checkout@v3
      
    - name: Use Node.js LTS
      uses: actions/setup-node@v3
      with:
        node-version: 'lts'
      run: |
        export github="true"
        npm install
        npm start
        
    - name: 📂 Sync files
      uses: airvzxf/ftp-deployment-action@latest
      with:
        server: ftp.rohitpai.co.uk
        user: u987021215.rodude123
        password: $${{ FTPPASSWORD }}
        local_dir: "./dist"
