Skip to content

add sshpass

add sshpass #13

Workflow file for this run

---
name: Upload files to mil.ufl.edu
# yamllint disable-line rule:truthy
on:
push:
branches:
- add-upload
jobs:
upload:
runs-on: self-hosted
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install lftp
run: sudo apt-get install -y lftp
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Upload files to web server
run: |
# We need to connect to the server for lftp to be happy, otherwise it
# hangs on "Connecting...". Connecting will add the host to
# known_hosts.
sshpass -p ${{ secrets.MIL_UFL_SFTP_PASS }} \
sftp -o StrictHostKeyChecking=no \
-P ${{ secrets.MIL_UFL_SFTP_PORT }} [email protected] << EOF
exit
EOF
lftp -u mil,${{ secrets.MIL_UFL_SFTP_PASS }} \
-p ${{ secrets.MIL_UFL_SFTP_PORT }} sftp://mil.ufl.edu << EOF
ls
exit
EOF
# lftp -c "open -u mil,${{ secrets.MIL_UFL_SFTP_PASS }}
# -p ${{ secrets.MIL_UFL_SFTP_PORT }}
# sftp://mil.ufl.edu;
# ls"
# lftp -c "open -u mil,${{ secrets.MIL_UFL_SFTP_PASS }}
# -p ${{ secrets.MIL_UFL_SFTP_PORT }}
# sftp://mil.ufl.edu;
# mirror -c
# --include='.*'
# --exclude='^\..*$'
# --only-newer --ignore-time
# -R --parallel
# .
# htdocs"