Skip to content

feat: storing shapes data in memory to send it to new user joining #46

feat: storing shapes data in memory to send it to new user joining

feat: storing shapes data in memory to send it to new user joining #46

Workflow file for this run

name: Deploy the websocket server
on:
push:
branches: [main]
paths:
- 'apps/ws/**'
- 'packages/**'
- '.github/workflows/cd_ws.yml'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile.websocket
provenance: false
push: true
tags: |
coderomm/collabydraw-websocket:latest
coderomm/collabydraw-websocket:${{ github.sha }}
- name: Check SSH key presence (for debug)
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" | head -n 15
# - name: Deploy to VM
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.VM_HOST }}
# username: ${{ secrets.VM_USERNAME }}
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# script: |
# docker pull coderomm/collabydraw-websocket:${{ github.sha }}
# docker stop collabydraw-websocket || true
# docker rm collabydraw-websocket || true
# docker run -d \
# --name collabydraw-websocket \
# --restart always \
# -p 8080:8080 \
# -e DATABASE_URL=${{ secrets.DATABASE_URL }} \
# coderomm/collabydraw-websocket:${{ github.sha }}