use loose security settings #3
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
| # Deploys the repository to cPanel over FTP (explicit FTPS on port 21) on push to main. | |
| # | |
| # cPanel shows: FTP server ftp.d2mods.info, user gha@d2mods.info, port 21 (FTP / explicit FTPS). | |
| # This is not SFTP (SSH); SFTP uses port 22 and was refusing from GitHub Actions. | |
| # | |
| # Secrets (Settings → Secrets and variables → Actions): | |
| # SFTP_HOST — FTP hostname from cPanel, e.g. ftp.d2mods.info | |
| # SFTP_USERNAME — full FTP username, e.g. gha@d2mods.info | |
| # SFTP_PASSWORD — password for that FTP account | |
| # | |
| name: Deploy FTP | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Sync via FTPS | |
| uses: SamKirkland/FTP-Deploy-Action@v4.3.6 | |
| with: | |
| server: ${{ secrets.SFTP_HOST }} | |
| username: ${{ secrets.SFTP_USERNAME }} | |
| password: ${{ secrets.SFTP_PASSWORD }} | |
| port: 21 | |
| protocol: ftps | |
| local-dir: ./ | |
| server-dir: ./ | |
| security: loose | |
| exclude: | | |
| **/.git* | |
| **/.git*/** | |
| **/.github/** |