feat: Implement fingerprinting and session management for room partic… #21
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 to EC2 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - production | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Deploy to EC2 | |
| uses: appleboy/ssh-action@v1 | |
| with: | |
| host: ${{ secrets.EC2_HOST }} | |
| username: ${{ secrets.EC2_USER }} | |
| key: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
| command_timeout: 20m | |
| script: | | |
| set -e | |
| cd /home/ubuntu/Anon-chat-backend || exit 1 | |
| git fetch --all | |
| git reset --hard origin/main | |
| yarn install --frozen-lockfile | |
| yarn build | |
| # Ensure docker-entrypoint.sh has execute permissions | |
| chmod +x docker-entrypoint.sh | |
| # Build with Docker BuildKit for better caching | |
| DOCKER_BUILDKIT=1 docker compose build --parallel | |
| # Start services | |
| docker compose up -d --remove-orphans |