Git Product home page Git Product logo

ftp-action's Introduction

FTP Smart File Copy

This .NET-based GitHub Action updates the destination to match the source over FTP, by executing the following steps:

  • Delete files from destination that do not exist in source.
  • skipUnchanged?
    • true
      • Update files that do not match between source and destination.
      • Upload files from source that do not exist in destination.
    • false
      • Upload all files from source to destination.

Inputs

Parameter Required Default Description
server Yes Address for the destination server.
port No 21 Port for the destination server.
username Yes Username for the destination server.
password Yes Password for the destination server.
source No / Directory in source from which to upload.
destination No / Directory in destination to which to upload.
skipUnchanged No false Only upload files that have changed.
skipDirectories No .github|.well-known Folders to be ignored in both source and destination, separated by a pipe (|) character.
test No false Do not perform file deletions or uploads; just output intended actions.

Example Workflow

# Workflow name
name: Deploy site to live
 
on:
  # Run automatically on push to main branch
  push:
    branches: [ main ]
    paths:
    - 'src/**'
  # Allow manual trigger
  workflow_dispatch:

jobs:
  web-deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
    - name: Get files
      uses: actions/[email protected]
      
    - name: FTP Deploy
      uses: cinderblockgames/[email protected]
      with:
        # required
        server: ftp.example.com
        username: [email protected]
        password: ${{ secrets.FTP_PASSWORD }}
        # optional
        port: 22
        source: src/path
        destination: target/path
        skipUnchanged: true
        skipDirectories: .github|.well-known|configs|private-keys
        test: true

ftp-action's People

Contributors

cinderblockgames avatar

Stargazers

 avatar

Watchers

 avatar

ftp-action's Issues

Separate out processors

With all the options being added, might be cleaner to separate out into some sort of processor structure rather than having it all in Program.cs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.