diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8729fda --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,33 @@ +name: Deploy to FTPS + +on: + push: + branches: + - production + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + # 1. Checkout the repository code + - name: Checkout code + uses: actions/checkout@v4 + + # 2. Set up PHP and Composer + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: "8.2" + tools: composer + + - name: Install Composer dependencies + run: composer install --no-dev --optimize-autoloader + + # 3. Deploy files to FTPS server + - name: Deploy to FTPS server + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 + with: + server: ${{ secrets.FTP_HOST }} + username: ${{ secrets.FTP_LOGIN }} + password: ${{ secrets.FTP_PASSWORD }}