/ssh-node-server-setup

Github Action to Setup a Server from New Ubuntu 22 LTS Install to Node Server and Push New Code on Commit.

Primary LanguageShell

ServerSetup Action

Github Action to Setup a Server from New Ubuntu 22 LTS Install to Node Server, and Push New Code automatically on Commit.

Inputs

server-username

The username used to connect to the server. Default is "root".

server-host

Required The domain name of the server to setup. Example: name.rch.app (this domain should point to the server IP).

user-email

Required An email used to request an https certificate using certbot.

ssh-key

Required Private ssh key. Public ssh key should be placed on the server.

Example usage

name: SSH Deploy
on: [push]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy Server Step
        uses: strawstack/ssh-node-server-setup@main
        with:
          server-host: ${{ secrets.SERVER_HOST }}
          user-email: ${{ secrets.USER_EMAIL }}
          ssh-key: ${{ secrets.SSH_KEY }}

Add Release Tag

  • git tag -a -m "My first action release" v1
  • git push --follow-tags