Skip to content

Commit

Permalink
fix action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Cooper committed Nov 13, 2024
1 parent a716481 commit affe6b8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
name: Node.js CI/CD on Amazon Linux

on:
push:
branches: [ main ]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: npm install

- name: Deploy to AWS EC2
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/aws-github"

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

0 comments on commit affe6b8

Please sign in to comment.