assets(thumbnails): replace arena environments and add all 7 robot ch… #473
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 Production | |
| on: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build & Push Server | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: apps/server/Dockerfile | |
| push: true | |
| tags: | | |
| alihaggag7/logic-arena-server:latest | |
| ghcr.io/ali-haggag7/logic-arena-server:latest | |
| - name: Build & Push Client | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: apps/client/Dockerfile | |
| push: true | |
| tags: | | |
| alihaggag7/logic-arena-client:latest | |
| ghcr.io/ali-haggag7/logic-arena-client:latest | |
| build-args: | | |
| NEXT_PUBLIC_API_URL=https://logicarena.dev/api | |
| NEXT_PUBLIC_WS_URL=https://logicarena.dev | |
| - name: Deploy to Server | |
| uses: appleboy/ssh-action@v1 | |
| with: | |
| host: ${{ secrets.SERVER_IP }} | |
| username: root | |
| password: ${{ secrets.SERVER_PASSWORD }} | |
| script: | | |
| cd ~/logic-arena | |
| docker compose pull | |
| docker compose up -d | |
| docker image prune -f |