feat: add multi-tab support for a single user #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |