Giter VIP home page Giter VIP logo

basemax / githubaction-sftp-deploy-password Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 22 KB

GitHub Actions: Automatically deploy and upload new pushed files to a server by SFTP protocol directly with password without SSH keys (.github/workflows/deploy.yml)

License: GNU General Public License v3.0

action actions ftp github-action github-actions sftp sftp-deploy sftp-synchronisation sftp-upload sftp-password

githubaction-sftp-deploy-password's Introduction

GitHub Actions: Deploy to SFTP with Password

Automatically deploy and upload new pushed files to a server by SFTP protocol directly with password without SSH keys.

Why this one and GitHub Actions?

It took me several hours to prepare and test this configuration, I'm happy to share this for free to save others time.

GitHub Actions are great to use in projects. Happy coding ^_^

GitHub Action

Create .github/workflows/deploy.yml file:

on: [push]

jobs:
  mirror_with_sftp:
    name: deploy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: FTP Deployer
        uses: sand4rt/[email protected]
        with:
          sftp: true
          host: ${{ secrets.SERVER_HOST }}
          port: 22
          username: ${{ secrets.SERVER_USERNAME }}
          password: ${{ secrets.SERVER_PASSWORD }}
          remote_folder: ${{ secrets.SERVER_PATH }}
          local_folder: '.'
          cleanup: false
          include: '[ "*", "**/*" ]'
          exclude: '["node_modules/**", "_secret.php", ".github/**", ".git/**", "*.env"]'
          pasive: true

Variables

  • SERVER_HOST
  • SERVER_USERNAME
  • SERVER_PASSWORD
  • SERVER_PATH

© Copyright Max Base, 2022

githubaction-sftp-deploy-password's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.