File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 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/ssh-action@v1.2.1
28+ with :
29+ host : ${{ secrets.SERVER_IP }}
30+ username : ${{ secrets.SERVER_ADMIN }}
31+ password : ${{ secrets.ADMIN_PASSWORD }}
32+ script : |
33+ cd code/${{ secrets.REPO_NAME }}
34+ git pull origin main
35+ docker compose down
36+ docker compose --profile redis up --build -d
Original file line number Diff line number Diff line change 11services :
22 nodebb :
3+ user : " 0"
34 build : .
45 # image: ghcr.io/nodebb/nodebb:latest
56 restart : unless-stopped
67 ports :
78 - ' 4567:4567' # comment this out if you don't want to expose NodeBB to the host, or change the first number to any port you want
89 volumes :
10+
911 - nodebb-build:/usr/src/app/build
1012 - nodebb-uploads:/usr/src/app/public/uploads
1113 - nodebb-config:/opt/config
You can’t perform that action at this time.
0 commit comments