feat: background

This commit is contained in:
tresabhi committed 2024-12-19 18:10:00 -06:00
1 parent 8517ecfdb6
commit 6d8326861b
2 files changed
+9 -6

No files matched your search

+8 -2
View File
@@ -122,5 +122,11 @@ jobs:
- name: AppArmor hack
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Build assets
run: bun run build:assets --all-targets --depot --production
- name: Start server and build assets
run: |
bun dev:website &
SERVER_PID=$!
bun run build:assets --all-targets --depot --production
kill $SERVER_PID || true
@@ -1,5 +1,4 @@
import { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from '@blitzkit/core';
import { exec } from 'child_process';
import { launch } from 'puppeteer';
import sharp from 'sharp';
import { commitAssets } from '../core/github/commitAssets';
@@ -9,8 +8,6 @@ export async function blitzkitTankIcons() {
console.log('Building blitzkit tank icons...');
console.log('Starting website dev server...');
const child = exec('cd ../.. && bun dev:website');
const browser = await launch();
const page = await browser.newPage();
const tanks = Object.values((await fetchTankDefinitions()).tanks);
@@ -44,7 +41,7 @@ export async function blitzkitTankIcons() {
files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content });
}
child.kill('SIGHUP');
await page.close();
await browser.close();
await commitAssets('tank icons', files);