|
1 | | -# Deploys the repository to cPanel over SFTP on every push to main. |
| 1 | +# Deploys the repository to cPanel over FTP (explicit FTPS on port 21) on push to main. |
2 | 2 | # |
3 | | -# cPanel “FTP Accounts” user (example): gha@d2mods.info → jailed to |
4 | | -# /home/brjoro/blizzardguide.d2mods.info |
5 | | -# Secrets: |
6 | | -# SFTP_HOST — usually your primary domain, e.g. d2mods.info (no sftp:// prefix) |
| 3 | +# cPanel shows: FTP server ftp.d2mods.info, user gha@d2mods.info, port 21 (FTP / explicit FTPS). |
| 4 | +# This is not SFTP (SSH); SFTP uses port 22 and was refusing from GitHub Actions. |
| 5 | +# |
| 6 | +# Secrets (Settings → Secrets and variables → Actions): |
| 7 | +# SFTP_HOST — FTP hostname from cPanel, e.g. ftp.d2mods.info |
7 | 8 | # SFTP_USERNAME — full FTP username, e.g. gha@d2mods.info |
8 | | -# SFTP_PASSWORD — password you set for that FTP account in cPanel |
| 9 | +# SFTP_PASSWORD — password for that FTP account |
9 | 10 | # |
10 | | -# Remote path: for a jailed FTP user, "/" is the account root (that folder above). If uploads |
11 | | -# land in the wrong place, try the full path instead, or /public_html if your docroot is there. |
| 11 | +# If FTPS fails with TLS/certificate errors, set protocol to ftp below (insecure; host may allow it). |
12 | 12 |
|
13 | | -name: Deploy SFTP |
| 13 | +name: Deploy FTP |
14 | 14 |
|
15 | 15 | on: |
16 | 16 | push: |
|
20 | 20 | jobs: |
21 | 21 | deploy: |
22 | 22 | runs-on: ubuntu-latest |
23 | | - env: |
24 | | - # Jailed login: "/" = /home/brjoro/blizzardguide.d2mods.info on the server |
25 | | - SFTP_REMOTE_PATH: / |
26 | 23 |
|
27 | 24 | steps: |
28 | 25 | - name: Checkout |
29 | 26 | uses: actions/checkout@v4 |
30 | 27 |
|
31 | | - - name: Upload via SFTP |
32 | | - uses: wlixcc/SFTP-Deploy-Action@v1.2.6 |
| 28 | + - name: Sync via FTPS |
| 29 | + uses: SamKirkland/FTP-Deploy-Action@v4.3.6 |
33 | 30 | with: |
34 | 31 | server: ${{ secrets.SFTP_HOST }} |
35 | 32 | username: ${{ secrets.SFTP_USERNAME }} |
36 | 33 | password: ${{ secrets.SFTP_PASSWORD }} |
37 | | - port: 22 |
38 | | - local_path: ./ |
39 | | - remote_path: ${{ env.SFTP_REMOTE_PATH }} |
40 | | - sftp_only: true |
41 | | - rsyncArgs: >- |
42 | | - --exclude=.git |
43 | | - --exclude=.github |
| 34 | + port: 21 |
| 35 | + protocol: ftps |
| 36 | + local-dir: ./ |
| 37 | + server-dir: ./ |
| 38 | + security: strict |
| 39 | + exclude: | |
| 40 | + **/.git* |
| 41 | + **/.git*/** |
| 42 | + **/.github/** |
0 commit comments