Giter Club home page Giter Club logo

deploy-ssh's Introduction

Deploy your application via SSH.

THIS IS CURRENTLY WORK IN PROGRESS - once v1 is released there will be no more major changes.

After a successful test run, this action can copy the project's files via SSH to another server, which could be an in-place deployment, or a fresh server that's set up for each deployment.

An example repository has been created at https://github.com/php-actions/example-deploy-ssh to show how to use this action in development and production projects.

Usage

Create your Github Workflow configuration in .github/workflows/ci.yml or similar.

name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      # Load the pre-build project files:
      - uses: actions/download-artifact@v3
        with:
          name: build-artifact
          path: /tmp/github-actions
    
      # Then deploy to your server of choice
      - uses: php-actions/deploy
        with:
          hostname: deploy.example.com
          user: webdeploy
          path: /var/www/example.com
          ssh_key: {{ secrets.deploy_ssh_key }}

To generate an SSH key pair (private and public) using the RSA algorithm, ssh-keygen -t rsa -b 4096 -C "deploy@github-acions". To convert a key pair into PEM format, ssh-keygen -f actions_rsa -e -m pem - then paste the contents of the generated PEM file into your project's Github Secrets.

// TODO: Document post-transfer script, how it might need adding to sudoers if sudo is required.

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.