Compare commits

...
9 Commits
Author SHA1 Message Date
tresabhi 006b2fef78 correct flag and tank media paths 2026-05-25 14:20:46 -05:00
tresabhi 26a0c1f176 temporarily disable build steps to see caching speed 2026-05-25 14:09:09 -05:00
tresabhi 403d1e7849 update wotb vars 2026-05-25 14:04:25 -05:00
tresabhi c9d8f6b445 oops, forgot the script 2026-05-25 13:53:42 -05:00
tresabhi 73c53d6ef5 download entire game on miss 2026-05-25 13:50:37 -05:00
tresabhi f8e8fd4016 game cache fingerprinting 2026-05-25 13:43:21 -05:00
tresabhi 15b29f439a steam username and password 2026-05-25 13:31:44 -05:00
tresabhi fd96cd5975 fingerprinting 2026-05-25 13:24:11 -05:00
tresabhi 66b9a9076f set up depot downloader 2026-05-25 12:58:19 -05:00
9 changed files with 105 additions and 29 deletions

No files matched your search

+51 -21
View File
@@ -4,8 +4,8 @@ on:
push:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
# schedule:
# - cron: "0 4 * * *"
permissions:
contents: read
@@ -20,11 +20,20 @@ env:
# blitz
WOTB_SERVER: ${{ secrets.WOTB_SERVER }}
WOTB_VERSION: ${{ secrets.WOTB_VERSION }}
PUBLIC_WOTB_CLIENT: ../../temp/game
WOTB_USMAP: ../closed/blitz.usmap
# google
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID: ${{ secrets.PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID }}
# steam
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
STEAM_APP: 3341250
STEAM_OS: windows
STEAM_FINGERPRINT: Manifest_UFSFiles_Win64.txt
jobs:
build:
name: Build chunk ${{ matrix.chunk }}
@@ -34,6 +43,9 @@ jobs:
chunk: [pages, api, media]
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
- name: Checkout
uses: actions/checkout@v6
with:
@@ -59,23 +71,41 @@ jobs:
repo-token: ${{ secrets.GH_TOKEN }}
- name: Set up project
run: bun run setup
- name: Build
run: bun run build:website
env:
BUILD_CHUNK: ${{ matrix.chunk }}
- name: Upload artifact
id: upload
uses: actions/upload-pages-artifact@v4
with:
path: dist/website
- name: Trigger target repository
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://github.com \
-d '{ "event_type": "deploy-pages", "client_payload": { "artifact_url": "${{ steps.upload.outputs.artifact_url }}" } }'
bun run setup
./scripts/setup_depot_downloader.sh
- name: Download fingerprint
run: |
./scripts/download_fingerprint.sh
- name: Download cached game
uses: actions/cache@v5
id: game-cache
with:
path: temp/game
key: ${{ runner.os }}-${{ hashFiles(format('temp/game/{0}', env.FINGERPRINT)) }}
- name: Download Steam game
if: steps.game-cache.outputs.cache-hit != 'true'
run: |
./scripts/download_game.sh
# - name: Build
# run: bun run build-website
# env:
# BUILD_CHUNK: ${{ matrix.chunk }}
# - name: Upload artifact
# id: upload
# uses: actions/upload-pages-artifact@v4
# with:
# path: dist/website
# - name: Trigger target repository
# run: |
# curl -X POST \
# -H "Authorization: token ${{ secrets.GH_TOKEN }}" \
# -H "Accept: application/vnd.github.v3+json" \
# https://github.com \
# -d '{ "event_type": "deploy-pages", "client_payload": { "artifact_url": "${{ steps.upload.outputs.artifact_url }}" } }'
+1 -1
View File
@@ -75,7 +75,6 @@
"dedup",
"defence",
"degressive",
"depotdownloader",
"devkrieg",
"diacriticless",
"DIDS",
@@ -92,6 +91,7 @@
"Everytime",
"FASTNAME",
"favicons",
"filelist",
"flexdirection",
"fontsource",
"FOURCC",
@@ -35,8 +35,8 @@ export function TankCard(props: PropsWithSkeleton<TankCardProps>) {
className={styles.flag}
style={{
backgroundImage: clientUnmounted
? "url(/api/unmounted/flag.png)"
: `url(/api/nations/${tank!.tank!.nation}/card.webp)`,
? "url(/media/unmounted/flag.png)"
: `url(/media/flags/cards/${tank!.tank!.nation}.webp)`,
}}
/>
)}
@@ -46,8 +46,8 @@ export function TankCard(props: PropsWithSkeleton<TankCardProps>) {
className={styles.icon}
style={{
backgroundImage: clientUnmounted
? "url(/api/unmounted/tank.png)"
: `url(/api/tanks/${props.id}.webp)`,
? "url(/media/unmounted/tank.png)"
: `url(/media/tanks/big/${props.id}.webp)`,
}}
/>
)}
@@ -76,14 +76,14 @@ const toolStrings = strings.tools[tool.id as keyof typeof strings.tools];
className="tool-card"
underline="never"
style={{
backgroundImage: `url(/assets/tools/${tool.id}.webp)`,
backgroundImage: `url(/media/tools/banners/${tool.id}.webp)`,
}}
data-gradient={gradient}
>
<div
class="poster"
style={{
backgroundImage: `url(/assets/tools/${tool.id}.webp)`,
backgroundImage: `url(/media/tools/banners/${tool.id}.webp)`,
}}
>
{gradient && <div class="gradient" />}
@@ -6,8 +6,11 @@ import {
} from "../../../../api/responses";
import { game } from "../../../../game/game";
import { clientUnmounted } from "../../../../game/unmounted";
import { getStaticPaths as _getStaticPaths } from "../../../[api]/tanks/[id].json";
import { getStaticPaths as __getStaticPaths } from "../../_index";
import { mixStaticPaths } from "../../../../astro/mixStaticPaths";
export { getStaticPaths } from "../../../[api]/tanks/[id].json";
export const getStaticPaths = mixStaticPaths(__getStaticPaths, _getStaticPaths);
export async function GET({ params }: APIContext<never, { id: string }>) {
if (clientUnmounted) return clientUnmountedResponse;
Regular → Executable
View File
File mode changed.
+12
View File
@@ -0,0 +1,12 @@
TEMP="temp"
FILES="temp/fingerprint.txt"
DEPOT_DOWNLOADER="$TEMP/DepotDownloader"
GAME="$TEMP/game"
set -a
source .env
set +a
echo $STEAM_FINGERPRINT > $FILES
$DEPOT_DOWNLOADER -os $STEAM_OS -app $STEAM_APP -filelist $FILES -username $STEAM_USERNAME -password $STEAM_PASSWORD -dir $GAME
+10
View File
@@ -0,0 +1,10 @@
TEMP="temp"
DEPOT_DOWNLOADER="$TEMP/DepotDownloader"
GAME="$TEMP/game"
set -a
source .env
set +a
$DEPOT_DOWNLOADER -os $STEAM_OS -app $STEAM_APP -username $STEAM_USERNAME -password $STEAM_PASSWORD -dir $GAME
+21
View File
@@ -0,0 +1,21 @@
REPO_USER="SteamRE"
REPO_NAME="DepotDownloader"
TEMP="temp"
OUT="$TEMP/$REPO_NAME"
ZIP="$TEMP/$REPO_NAME.zip"
URL=$(
curl -s "https://api.github.com/repos/$REPO_USER/$REPO_NAME/releases/latest" \
| jq -r '.assets[]
| select(.name | contains("linux-x64"))
| .browser_download_url' \
| head -n 1
)
mkdir -p "$TEMP"
curl -L "$URL" -o "$ZIP"
unzip -p "$ZIP" "$REPO_NAME" > "$OUT"
rm "$ZIP"
chmod +x "$OUT"