Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/VM Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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 ${{ secrets.REPO_NAME }}
git pull origin main
docker compose down
docker compose -f docker-compose-redis.yml up --build -d
Loading