-
Notifications
You must be signed in to change notification settings - Fork 8
32 lines (30 loc) · 853 Bytes
/
deploy.yml
File metadata and controls
32 lines (30 loc) · 853 Bytes
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
name: Update Dev Server
run-name: acode.app/main - ${{ github.run_number }}
on:
push:
branches:
- main
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
export PATH="/home/${{ secrets.SSH_USER }}/.nvm/versions/node/v22.12.0/bin/:$PATH"
if ! command -v git &> /dev/null
then
sudo apt-get update
sudo apt-get install -y git
fi
cd ~/sites/acode.app
git restore .
git pull
npm install
npm run build
pm2 restart acode.app