forked from priyagupta108/sample-node
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 838 Bytes
/
issue1143.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Release (Private Packages)
on:
workflow_dispatch:
jobs:
version_or_release:
name: 'Version and open PR (or) release private packages'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: dev
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_RUNNER }}
- name: Add SSH known hosts
run: |
mkdir -p ~/.ssh
ssh-keyscan -p ${{ secrets.SSH_PORT }} ${{ secrets.HOST_DEV }} >> ~/.ssh/known_hosts
- name: Deploy to server
run: |
ssh -p ${{ secrets.SSH_PORT }} ${{ secrets.HOST_USER }}@${{ secrets.HOST_DEV }} << 'EOF'
cd /home/app
git checkout dev
git pull origin dev
yarn
yarn db:migrate
pm2 restart crm_backend
EOF