3

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

Raold
  • 1,383
  • 4
  • 20
  • 33

1 Answers1

3

yes you can do this. I have already written a guide for the exact thing that you are looking for. check it out.

https://chathula.dev/how-to-set-up-a-ci-cd-pipeline-for-a-node-js-app-with-github-actions/