Skip to content

Commit

Permalink
Update nodejs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tcooperma authored Nov 13, 2024
1 parent 2c92839 commit c9feafb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ jobs:
run: npm install

- name: Deploy to AWS EC2
uses: tcooperma/scp-action@main
uses: tcooperma/aws-github@main
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: "./" # This now correctly points to the current directory
target: "/var/www/your_project_directory"
target: "/var/www/aws-github"

- name: Restart PM2 application
uses: tcooperma/ssh-action@main
uses: tcooperma/aws-github@main
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /var/www/your_project_directory
cd /var/www/yaws-github
pm2 reload all # This command restarts your application

0 comments on commit c9feafb

Please sign in to comment.