Live Counter-Strike matches
+Click the icon next to a match to pin them for easier access, or check back later
diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index fbdafa5..799361c 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -2,15 +2,49 @@ name: CD on: push: - branches: [main, v2] + branches: [main] + +concurrency: + group: cd-${{ github.ref_name }} + cancel-in-progress: true jobs: + build-and-push: + name: Build and push Docker image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + - name: Log in to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Restore Docker build cache + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + - name: Build and push image + uses: docker/build-push-action@v7 + with: + context: . + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/botmafieux:latest + ${{ secrets.DOCKER_USERNAME }}/botmafieux:${{ github.sha }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache,mode=max + deploy: name: Deploy to VPS needs: build-and-push runs-on: ubuntu-latest steps: - - name: Copy files to VPS + - name: Copy compose file to VPS uses: appleboy/scp-action@v1 with: host: ${{ secrets.VPS_HOST }} @@ -19,7 +53,6 @@ jobs: port: ${{ secrets.VPS_SSH_PORT }} source: "compose.yaml" target: "/opt/docker/botmafieux" - - name: Deploy on VPS uses: appleboy/ssh-action@v1 with: @@ -28,12 +61,7 @@ jobs: key: ${{ secrets.VPS_SSH_KEY }} port: ${{ secrets.VPS_SSH_PORT }} script: | + set -euo pipefail cd /opt/docker/botmafieux - - docker compose -f compose.yaml --env-file .env down - - docker compose -f compose.yaml --env-file .env build - - docker compose -f compose.yaml --env-file .env up -d - - docker compose -f compose.yaml --env-file .env.prod ps \ No newline at end of file + docker compose -f compose.yaml --env-file .env pull + docker compose -f compose.yaml --env-file .env up -d --remove-orphans diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..ca163b7 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.13 + - name: Install dependencies + run: python -m pip install --no-cache-dir -r requirements.txt + - name: Run pytest + run: pytest -q diff --git a/compose.yaml b/compose.yaml index be44ad3..02f519f 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,9 +1,22 @@ +networks: + internal: + internal: true + outbound: + external: true + services: botmafieux: - build: - context: . - dockerfile: ./Dockerfile - tags: - - nebulo9/botmafieux:v2 + image: nebulo9/botmafieux:latest container_name: botmafieux - env_file: ./.env \ No newline at end of file + restart: unless-stopped + networks: + - internal + - outbound + env_file: ./.env + volumes: + - ./config:/config + deploy: + resources: + limits: + cpus: '0.25' + memory: '256M' diff --git a/config/hltv.html b/config/hltv.html new file mode 100644 index 0000000..fc7ae8e --- /dev/null +++ b/config/hltv.html @@ -0,0 +1,6778 @@ +
+ + + + + + + + + + + + + + + + + + + + + +
Casters(37)
Streamers(15)
Organizers(8)
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+