Skip to content

fix: fixed cd

fix: fixed cd #17

Workflow file for this run

name: Deploy to production
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Dependencies and build
run: |
npm install
npm run build
- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: |
cd /home/vineet/projects/blogs.vineet.tech
echo "${{ secrets.SUDO_PASSWORD }}" | -S git pull origin main
npm install
npm run build
pm2 restart blog