Skip to content

πŸš€ Syncs a local folder with a remote folder over FTP using GitHub Workflow.

License

Notifications You must be signed in to change notification settings

modern-dev/ftp-mirror

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ FTP Mirror

Syncs a local folder with a remote folder over FTP using GitHub Workflow.

πŸ“‹ Usage

Create custom workflow for your project as per this doc. Read more about Encrypted Secrets here.

name: πŸš€ Deploy
on:
  push:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Here is the deployment action
      - name: Upload from output to a remote server via FTP
        uses: modern-dev/ftp-mirror@v2
        with:
          server: ${{ secrets.FTP_SERVER }}
          user: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
          local_dir: "./output"
          remote_dir: "./http"
          delete: "false"
          exlude: "data/ cache/"

πŸ”§ Settings

Option Description Required Default Example
server FTP Server. Yes N/A ftp.myserver.com
user FTP Username. Yes N/A [email protected]
password FTP Password. Yes N/A mystrongpassword
local_dir Local directory. No "./" "./public_html"
remote_dir Remote directory. No "./" "/www/user/home"
delete Delete all the files inside of the remote directory before the upload process. No false N/A
exclude Exclude matching files. No "" "data/ cache/"
exclude_glob Exclude matching files using glob pattern. No "" "*.bak"
max_retries Times that the lftp will be executed if an error occurred. No 10 N/A
no_symlinks Do not create symbolic links. No true N/A
ftp_ssl_allow FTP - Allow SSL encryption No false N/A
ftp_use_feat FTP - FEAT: Determining what extended features the FTP server supports. No false N/A
ftp_nop_interval FTP - Delay in seconds between NOOP commands when downloading tail of a file. No 2 N/A
net_max_retries NET - Maximum number of operation without success.
0 unlimited.
1 no retries.
No 1 N/A
net_persist_retries NET - Ignore hard errors.
When reply 5xx errors or there is too many users.
No 5 N/A
net_timeout NET - Sets the network protocol timeout. No 15s N/A
dns_max_retries DNS - 0 no limit trying to lookup an address otherwise try only this number of times. No 8 N/A
dns_fatal_timeout DNS - Time for DNS queries.
Set to "never" to disable.
No 10s N/A

More information in the official site for lftp - Manual pages

πŸ“— License

Licensed under the MIT license.

Copyright (c) 2022 Bohdan Shtepan


modern-dev.com Β Β·Β  GitHub: @virtyaluk Β Β·Β  Twitter: @virtyaluk

About

πŸš€ Syncs a local folder with a remote folder over FTP using GitHub Workflow.

Resources

License

Stars

Watchers

Forks