Skip to content

Commit 9a5eea8

Browse files
authored
Merge pull request #62 from CMU-313/NodeBB-root-privilege
Add VM Deploy workflow
2 parents 784ff34 + 3d9afe4 commit 9a5eea8

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/VM Deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: VM Deploy NodeBB
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-and-deploy:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Node.js version
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '20.17.0'
25+
26+
- name: Deploy via SSH
27+
uses: appleboy/[email protected]
28+
with:
29+
host: ${{ secrets.SERVER_IP }}
30+
username: ${{ secrets.SERVER_ADMIN }}
31+
password: ${{ secrets.ADMIN_PASSWORD }}
32+
script: |
33+
cd ${{ secrets.REPO_NAME }}
34+
git pull origin main
35+
docker compose down
36+
docker compose -f docker-compose-redis.yml up --build -d

0 commit comments

Comments
 (0)