From 43b59e4f02764313c30bc332b722a801597821c8 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Fri, 31 Jul 2026 20:12:54 -0500 Subject: [PATCH] update workflows to work with production as the deploy branch --- .github/workflows/assets.yml | 5 +-- .github/workflows/build-bot.yml | 34 ----------------- .github/workflows/discover-ids.yml | 36 ------------------ .github/workflows/host-bot.yml | 61 ------------------------------ .github/workflows/rating-asia.yml | 46 ---------------------- .github/workflows/rating-eu.yml | 46 ---------------------- .github/workflows/rating-na.yml | 46 ---------------------- .github/workflows/website.yml | 2 +- 8 files changed, 2 insertions(+), 274 deletions(-) delete mode 100644 .github/workflows/build-bot.yml delete mode 100644 .github/workflows/discover-ids.yml delete mode 100644 .github/workflows/host-bot.yml delete mode 100644 .github/workflows/rating-asia.yml delete mode 100644 .github/workflows/rating-eu.yml delete mode 100644 .github/workflows/rating-na.yml diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index f71f06861..e9280a7a9 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -2,7 +2,7 @@ name: Assets on: push: - branches: main + branches: production workflow_dispatch: inputs: @@ -22,9 +22,6 @@ on: description: "Archive URL or Steam to download (example: steam:APP_ID/DEPOT_ID or zip:URL_TO_ZIP)" default: "steam:444200/444202" - schedule: - - cron: "0 2 * * *" - concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs.asset_repo }} cancel-in-progress: true diff --git a/.github/workflows/build-bot.yml b/.github/workflows/build-bot.yml deleted file mode 100644 index 501cd703f..000000000 --- a/.github/workflows/build-bot.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Bot - -on: - push: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build bot - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - uses: oven-sh/setup-bun@v2 - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - - run: bun run setup - - - name: Build bot - run: bun run build:bot - - - name: Archive build - uses: actions/upload-artifact@v7 - with: - name: bot - path: dist/bot diff --git a/.github/workflows/discover-ids.yml b/.github/workflows/discover-ids.yml deleted file mode 100644 index 3d5d76a9b..000000000 --- a/.github/workflows/discover-ids.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: IDs - -on: - workflow_dispatch: - schedule: - - cron: "0 0 * * 1" - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} - DATABASE_URL: ${{ secrets.DATABASE_URL }} - PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }} - PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }} - PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - uses: oven-sh/setup-bun@v2 - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - - run: bun run setup - - - name: Discover IDs - run: bun build:ids --production diff --git a/.github/workflows/host-bot.yml b/.github/workflows/host-bot.yml deleted file mode 100644 index e7c47fb7c..000000000 --- a/.github/workflows/host-bot.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Host - -on: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} - DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} - DATABASE_URL: ${{ secrets.DATABASE_URL }} - PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }} - PUBLIC_ASSET_BRANCH: ${{ secrets.PUBLIC_ASSET_BRANCH }} - PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} - PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }} - PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }} - PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }} - ALLOW_ROBOTS: ${{ secrets.ALLOW_ROBOTS }} - WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} - PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }} - PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }} - WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }} - PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }} - PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }} - PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }} - PUBLIC_GUIDE_WEBSITE: ${{ secrets.PUBLIC_GUIDE_WEBSITE }} - SERVICING: ${{ secrets.SERVICING }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - -jobs: - host: - runs-on: ubuntu-latest - - steps: - - uses: oven-sh/setup-bun@v2 - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - - - name: Download release assets - run: | - DOWNLOAD_URL=$(curl -s https://api.github.com/repos/blitzkit/blitzkit/releases/latest \ - | grep "browser_download_url.*bot.zip" \ - | cut -d : -f 2,3 \ - | tr -d \") - curl -L -o bot.zip $DOWNLOAD_URL - mkdir -p dist/bot - unzip bot.zip -d dist/bot - - - name: Install sharp - run: bun init -y && bun add sharp - - - name: Move directories - run: mv dist/bot/prisma . - - - name: Run bot - run: bun run dist/bot/main.js diff --git a/.github/workflows/rating-asia.yml b/.github/workflows/rating-asia.yml deleted file mode 100644 index 1c85cb67b..000000000 --- a/.github/workflows/rating-asia.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Rating Asia - -on: - workflow_dispatch: - schedule: - - cron: "0 17 * * *" - -env: - PUBLIC_ASSET_BRANCH: main - PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }} - DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} - DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} - DATABASE_URL: ${{ secrets.DATABASE_URL }} - PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} - PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }} - PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }} - PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }} - ALLOW_ROBOTS: "true" - WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} - PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }} - PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }} - WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }} - PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }} - PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }} - PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - -jobs: - host: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - uses: oven-sh/setup-bun@v2 - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - - run: bun run setup - - - name: Generate leaderboard - run: bun build:ratingleaderboard --region=asia diff --git a/.github/workflows/rating-eu.yml b/.github/workflows/rating-eu.yml deleted file mode 100644 index e8c27e389..000000000 --- a/.github/workflows/rating-eu.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Rating Europe - -on: - workflow_dispatch: - schedule: - - cron: "0 23 * * *" - -env: - PUBLIC_ASSET_BRANCH: main - PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }} - DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} - DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} - DATABASE_URL: ${{ secrets.DATABASE_URL }} - PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} - PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }} - PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }} - PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }} - ALLOW_ROBOTS: "true" - WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} - PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }} - PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }} - WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }} - PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }} - PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }} - PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - -jobs: - host: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - uses: oven-sh/setup-bun@v2 - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - - run: bun run setup - - - name: Generate leaderboard - run: bun build:ratingleaderboard --region=eu diff --git a/.github/workflows/rating-na.yml b/.github/workflows/rating-na.yml deleted file mode 100644 index 1c3ff2a45..000000000 --- a/.github/workflows/rating-na.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Rating North America - -on: - workflow_dispatch: - schedule: - - cron: "0 5 * * *" - -env: - PUBLIC_ASSET_BRANCH: main - PUBLIC_ASSET_REPO: ${{ secrets.PUBLIC_ASSET_REPO }} - DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }} - DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} - DATABASE_URL: ${{ secrets.DATABASE_URL }} - PUBLIC_WARGAMING_APPLICATION_ID: ${{ secrets.PUBLIC_WARGAMING_APPLICATION_ID }} - PUBLIC_ASSET_FAST_USER: ${{ secrets.PUBLIC_ASSET_FAST_USER }} - PUBLIC_ASSET_FAST_REPO: ${{ secrets.PUBLIC_ASSET_FAST_REPO }} - PUBLIC_PROMOTE_OPENTEST: ${{ secrets.PUBLIC_PROMOTE_OPENTEST }} - ALLOW_ROBOTS: "true" - WOTB_GLOSSARY: ${{ secrets.WOTB_GLOSSARY }} - PUBLIC_GOOGLE_TAG_MANAGER_ID: ${{ secrets.PUBLIC_GOOGLE_TAG_MANAGER_ID }} - PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }} - GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} - WOTB_GLOSSARY_DOMAIN: ${{ secrets.WOTB_GLOSSARY_DOMAIN }} - WOTB_GLOSSARY_PATH: ${{ secrets.WOTB_GLOSSARY_PATH }} - PUBLIC_DISCORD_SERVER_ID: ${{ secrets.PUBLIC_DISCORD_SERVER_ID }} - PUBLIC_ASSET_BASE: ${{ secrets.PUBLIC_ASSET_BASE }} - PUBLIC_BRANCH: ${{ secrets.PUBLIC_BRANCH }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - -jobs: - host: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - with: - submodules: recursive - token: ${{ secrets.GH_TOKEN }} - - uses: oven-sh/setup-bun@v2 - - uses: arduino/setup-protoc@v3 - with: - repo-token: ${{ secrets.GH_TOKEN }} - - run: bun run setup - - - name: Generate leaderboard - run: bun build:ratingleaderboard --region=com diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 1c739206c..6c2254b23 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -58,7 +58,7 @@ jobs: path: dist/website deploy-github-pages: - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/production' }} name: Deploy to GitHub Pages runs-on: ubuntu-latest needs: build