feat(ci): use rsync instead of lftp
Some checks failed
Deploy to SFTP Server / build (push) Failing after 8m57s
Some checks failed
Deploy to SFTP Server / build (push) Failing after 8m57s
This commit is contained in:
26
.github/workflows/default.yaml
vendored
26
.github/workflows/default.yaml
vendored
@ -55,19 +55,15 @@ jobs:
|
||||
# Install dependencies, build, and generate site output
|
||||
pnpm i && pnpm build
|
||||
|
||||
- name: 🚀 Deploy files via SFTP
|
||||
continue-on-error: true
|
||||
uses: pressidium/lftp-mirror-action@v1
|
||||
with:
|
||||
host: ${{ secrets.FTP_HOST }}
|
||||
port: ${{ secrets.FTP_PORT || 21 }}
|
||||
user: ${{ secrets.FTP_USERNAME }}
|
||||
pass: ${{ secrets.FTP_PASSWORD }}
|
||||
onlyNewer: true
|
||||
restoreMTime: false
|
||||
parallel: '3'
|
||||
settings: 'sftp:auto-confirm=yes'
|
||||
localDir: 'dist'
|
||||
remoteDir: '/share/new-website'
|
||||
options: '--verbose'
|
||||
- name: 🔑 Set up SSH Key
|
||||
run: |
|
||||
echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa
|
||||
chmod 600 /tmp/id_rsa
|
||||
ssh-add /tmp/id_rsa
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
|
||||
- name: 🚀 Deploy Changed Files via rsync
|
||||
run: |
|
||||
rsync -avz --delete -e "ssh -p ${SSH_PORT}" ./dist/ ${SSH_USER}@${SSH_HOST}:${REMOTE_DIR}
|
||||
|
Reference in New Issue
Block a user