Giter Site home page Giter Site logo

ssh-push's Introduction

✨ SSH for GitHub Actions

GitHub Action for publish your app via SSH and execute commands.

Actions Status

Variables

See action.yml for more detailed information.

  • HOST - SSH remote host
  • PORT - SSH protocol port, default is 22
  • USERNAME - SSH username
  • PASSWORD - Password of ssh user
  • SOURCE - Folder to be transferred
  • DESTINATION - Destination of source file as archive on remote host
  • SCRIPTS - Execute commands after transfer source file

Usage

on: [push]

jobs:
  deployment_job:
    runs-on: ubuntu-latest
    name: Deployment Job
    steps:
    - uses: actions/checkout@v3

    - name: Set up Node.js
      uses: actions/setup-node@v3
      with:
        node-version: 16

    - name: npm install, build, and test
      run: |
        npm install
        npm run build --if-present

    - name: SSH
        uses: ErenKrt/ssh-push@main
        with:
          host: ${{ secrets.HOST }}
          username: ${{ secrets.USERNAME }}
          password: ${{ secrets.PASSWORD }}
          source: "./dist"
          destination: "/home/eren/web.zip"
          #scripts: |
          #  rm -r /home/eren/erencandev && mkdir /home/eren/erencandev
          #  cd /home/eren/erencandev && mv /home/eren/web.zip . &&
          #  unzip web.zip && rm -r web.zip
          #  rm -r /home/eren/erencandev/node_modules
          #  sudo -s && cd /home/eren/erencandev/ && npm i
          #  pm2 restart 1

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.