Skip to content

Commit 4f3a9a7

Browse files
committed
update gha build pipeline
1 parent 7e3713b commit 4f3a9a7

1 file changed

Lines changed: 20 additions & 21 deletions

File tree

.github/workflows/deploy-sftp.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
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.
22
#
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
78
# 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
910
#
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).
1212

13-
name: Deploy SFTP
13+
name: Deploy FTP
1414

1515
on:
1616
push:
@@ -20,24 +20,23 @@ on:
2020
jobs:
2121
deploy:
2222
runs-on: ubuntu-latest
23-
env:
24-
# Jailed login: "/" = /home/brjoro/blizzardguide.d2mods.info on the server
25-
SFTP_REMOTE_PATH: /
2623

2724
steps:
2825
- name: Checkout
2926
uses: actions/checkout@v4
3027

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
3330
with:
3431
server: ${{ secrets.SFTP_HOST }}
3532
username: ${{ secrets.SFTP_USERNAME }}
3633
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

Comments
 (0)