tripteki / cd-server

Trip Teknologi's Continuous Delivery and Continuous Deployment Server Convention

Home Page:https://github.com/marketplace/actions/continuous-delivery-and-continuous-deployment-server-convention

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convention

Trip Teknologi's Continuous Delivery and Continuous Deployment Server Convention.

Getting Started

How to use :

  • Optionally in your own running :
    ssh-keygen -t rsa -b 4096 -a 100 -o -f ~/.ssh/id_rsa.

  • Optionally in your own running :
    ssh-keyscan -t rsa -p <port> -H <host> >> ~/.ssh/known_hosts.

  • You need to publish your publickey to server's ~/.ssh/authorized_keys with running :
    ssh-copy-id -i ~/.ssh/id_rsa.pub -p <port> <user>@<host>.

  • You need to create a workflow in .github/workflows/.

    Sample file :

    name: Continuous Delivery and Continuous Deployment Server
    
    on: push
    
    jobs:
        cd:
            runs-on: ubuntu-latest
            steps:
                - uses: tripteki/cd-server@1.0.0
                  with:
                    token: ${{ secrets.GITHUB_TOKEN }}
                    artifact: <artifact>.<extension>
                    type: ssh
                    host: ${{ secrets.SERVER_HOST }}
                    port: ${{ secrets.SERVER_PORT }}
                    user: ${{ secrets.SERVER_USER }}
                    privatekey: ${{ secrets.SERVER_PRIVATE_KEY }}
                    privatekey_passphrase: ${{ secrets.SERVER_PRIVATE_KEY_PASSPHRASE }}
                    path: "/var/www/codebase/"
                - uses: tripteki/cd-server@1.0.0
                  with:
                    token: ${{ secrets.GITHUB_TOKEN }}
                    artifact: <artifact>.<extension>
                    type: command
                    host: ${{ secrets.SERVER_HOST }}
                    port: ${{ secrets.SERVER_PORT }}
                    user: ${{ secrets.SERVER_USER }}
                    privatekey: ${{ secrets.SERVER_PRIVATE_KEY }}
                    privatekey_passphrase: ${{ secrets.SERVER_PRIVATE_KEY_PASSPHRASE }}
                    script: |
                        APP_ENV=production ./bin/project -b -l -t -e -c
    
  • artifact section value possibilities :
    composer.json, package.json, pyproject.toml, etc.

  • type section value possibilities :
    ssh, command.

Author

About

Trip Teknologi's Continuous Delivery and Continuous Deployment Server Convention

https://github.com/marketplace/actions/continuous-delivery-and-continuous-deployment-server-convention

License:MIT License