changed appleboy version #13
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 chat-docs-library to EC2 | |
on: | |
push: | |
branches: | |
- prod | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Install pnpm | |
run: npm install -g pnpm@latest | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Build Application | |
run: pnpm build | |
- name: Deploy to EC2 | |
uses: appleboy/ssh-action@v1.0.3 | |
with: | |
host: ${{ env.EC2_IP_ADDRESS }} | |
username: ${{ env.EC2_USERNAME }} | |
key: ${{ env.EC2_PRIVATE_KEY }} | |
script: | | |
cd chat-docs-library | |
git pull | |
pnpm install | |
pm2 restart chat-docs-library |