Skip to content

Commit

Permalink
Update aws.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
apratimshukla6 authored Apr 30, 2024
1 parent 38f315d commit fd00602
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '22.0.0'
cache: 'npm'

- name: Upgrade npm
run: npm install -g npm@latest

- name: Clear npm cache
run: npm cache clean --force

- name: Remove node_modules
run: rm -rf node_modules

- name: Install Dependencies
run: npm install
Expand All @@ -30,7 +40,7 @@ jobs:
key: ${{ secrets.EC2_KEY }}
port: 22
source: "build/*"
target: "~/resview"
target: "~/resview-pvt"

- name: Deploy to server
uses: appleboy/ssh-action@master
Expand All @@ -41,7 +51,7 @@ jobs:
port: 22
script: |
pm2 delete resview || true
cd ~/resview
cd ~/resview-pvt
npm install -g http-server
pm2 start http-server --name "resview" -- -p 7500 -c-1 ./build
pm2 start http-server --name "resview-pvt" -- -p 7500 -c-1 ./build
pm2 save

0 comments on commit fd00602

Please sign in to comment.