Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

Β 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Simple way to restart a service on a remote server using PM2 for pnpm projects.

The logic is simple:

  • Connect to the server using SSH
  • Go to the project folder
  • Pull the last changes
  • Restart the service

Example

name: Deploy last changes
on:
  push:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Restart service
        uses: fcocea/pm2-restart-action@v1
        with:
          SSH_HOST: ${{ secrets.SSH_HOST }}
          SSH_USER: ${{ secrets.SSH_USER }}
          SSH_PASS: ${{ secrets.SSH_PASSWORD }}
          SSH_PORT: ${{ secrets.SSH_PORT }} # Default: 22
          FOLDER: ${{secrets.FOLDER}}
          PM2_SERVICE: ${{secrets.PM2_SERVICE}}
          REPO_BRANCH: main # Default: main    

TODO

  • Add support for SSH keys
  • Add support for other package managers
  • Add support for other services

About

πŸ”„ Easily restart a remote PM2 service over SSH for your pnpm projects

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages