name: 🚀 Deploy to FTP

on:
  push:
    branches: [ src ]

jobs:

  build:

    name: Build & Deploy
    runs-on: ubuntu-20.04

    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 3.9.6
    
    - name: Set up Poetry
      uses: abatilo/actions-poetry@v2.1.2
      with:
        poetry-version: 1.1.7

    - name: Install dependencies
      run: poetry install

    - name: Generate static output
      run: poetry run pelican -s publishconf.py

    - name: Deploy website to FTP
      uses: SamKirkland/FTP-Deploy-Action@4.0.0
      with:
        server: ${{ secrets.ftp_server }}
        username: ${{ secrets.ftp_username }}
        password: ${{ secrets.ftp_password }}
        local-dir: ./output/publish/
        server-dir: ./public_html/

name: 🚀 Deploy to FTP

on:
  push:
    branches: [ src ]
  workflow_dispatch

jobs:

  build:

    name: Build & Deploy
    runs-on: ubuntu-20.04

    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 3.9.6
    
    - name: Set up Poetry
      uses: abatilo/actions-poetry@v2.1.2
      with:
        poetry-version: 1.1.7

    - name: Install dependencies
      run: poetry install

    - name: Generate static output
      run: poetry run pelican -s publishconf.py

    - name: Deploy website to FTP
      uses: SamKirkland/FTP-Deploy-Action@4.0.0
      with:
        server: ${{ secrets.ftp_server }}
        username: ${{ secrets.ftp_username }}
        password: ${{ secrets.ftp_password }}
        local-dir: ./output/publish/
        server-dir: ./public_html/

Add option to trigger deployment manually
Add option to trigger deployment manually
