Github Action to Setup a Server from New Ubuntu 22 LTS Install to Node Server, and Push New Code automatically on Commit.
The username used to connect to the server. Default is "root".
Required The domain name of the server to setup. Example: name.rch.app (this domain should point to the server IP).
Required An email used to request an https certificate using certbot.
Required Private ssh key. Public ssh key should be placed on the server.
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 }}
- git tag -a -m "My first action release" v1
- git push --follow-tags