Skip to content

Commit

Permalink
build: add ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Rex-82 committed Aug 19, 2024
1 parent 1ab75ba commit 52c959d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Deploy app

name: Deploy

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- name: Deploy using ssh
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
port: ${{ secrets.PORT }}
command_timeout: 5m
script: |
cd ~/repos/websocket/server
git pull origin main
git status
if [ $(docker ps -q -f name=websocket-chat) ]; then
docker-compose down
fi
docker-compose build
docker-compose up -d

0 comments on commit 52c959d

Please sign in to comment.