chore(ci): install pnpm latest version in deploy.yaml for GitHub Actions #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Deploy to AWS" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: Install Dependencies | |
run: pnpm install | |
- name: SSH into EC2 and Deploy | |
uses: appleboy/ssh-action@v1.0.3 | |
with: | |
host: ${{ secrets.EC2_HOST }} | |
username: ${{ secrets.EC2_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: ${{ secrets.EC2_PORT }} | |
script: | | |
cd /home/ubuntu/chatify | |
git pull origin main | |
pnpm install | |
pm2 restart index |