forked from CMU-17313Q/cmu-17313q-f25-nodebb-f25-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 801 Bytes
/
VM Deploy.yml
File metadata and controls
36 lines (29 loc) · 801 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
33
34
35
36
name: VM Deploy NodeBB
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: '20.17.0'
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.SERVER_IP }}
username: ${{ secrets.SERVER_ADMIN }}
password: ${{ secrets.ADMIN_PASSWORD }}
script: |
cd code/${{ secrets.REPO_NAME }}
git pull origin main
docker compose down
docker compose --profile redis up --build -d