Deploy nodejs application to dedicated server with Github Actions

Viewed 2049

I have a simple question, but I can't find the answer. I've searched everywhere (exaggeration).

Description

I have dedicated server running ubuntu where my nestjs application is running. I am using github for my remote repository and my current deployment process is:

  1. local: git push push changes to github repository
  2. local: ssh user@IP access my server via SSH
  3. server: git pull pull changes to server from github repository
  4. server: npm run build build project
  5. server: pm2 restart myapp restart application

Manual process that take some amount of time.

Question

Can I use Github Actions to automate this process and how? Thank you

1 Answers
Related