GithubHelp home page GithubHelp logo

pondpaun7z / capistrano-deploy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seuros/capistrano-deploy

0.0 1.0 0.0 810 KB

Github Actions for Capistrano

License: MIT License

JavaScript 100.00%

capistrano-deploy's Introduction

Capistrano actions

Github deploy action for Capistrano. Use this action to automate your capistrano deployment process.

Inputs

target

Environment where deploy is to be performed to. E.g. "production", "staging". Default value is empty

deploy_key

Required Symmetric key to decrypt private RSA key. Must be a string.

enc_rsa_key_pth

Required Path to the encrypted key. Default "config/deploy_id_rsa_enc".

Outputs

No outputs

Setting up CD using this action

  1. Generate SSH keys on the target machine
$ ssh-keygen
  1. Export public key to the authorized_keys to allow the usage of this keypair to login
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  1. Add public key from ~/.ssh/id_rsa.pub to your repository's deployment keys via Settings / Deploy keys / Add
  2. Encrypt your private key with a strong password. Please use these options, otherwise this action may not be able to decrypt your key.
$ openssl enc -aes-256-cbc -md sha512 -salt -in .ssh/id_rsa -out deploy_id_rsa_enc -k PASSWORD -a
  1. Add deploy_id_rsa_enc file to your repository. Suggested path is config/deploy_id_rsa_enc
  2. Save the password used in step 4 as a secret in repository settings via Settings / Secrets / Add
  3. Create YAML configuration for your workflow (example below)

Workflow example

name: deploy_production

on:
  push:
    branches: 
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: miloserdow/[email protected]
      with:
        target: 'production'
        deploy_key: ${{ secrets.DEPLOY_ENC_KEY }}

capistrano-deploy's People

Contributors

miloserdow avatar pondpaun7z avatar

Watchers

James Cloos 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.