mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: background
This commit is contained in:
1 parent
8517ecfdb6
commit
6d8326861b
2 files changed
+9
-6
No files matched your search
@@ -122,5 +122,11 @@ jobs:
|
|||||||
- name: AppArmor hack
|
- name: AppArmor hack
|
||||||
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
|
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
|
||||||
|
|
||||||
- name: Build assets
|
- name: Start server and build assets
|
||||||
run: bun run build:assets --all-targets --depot --production
|
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 { BLITZKIT_TANK_ICON_SIZE, fetchTankDefinitions } from '@blitzkit/core';
|
||||||
import { exec } from 'child_process';
|
|
||||||
import { launch } from 'puppeteer';
|
import { launch } from 'puppeteer';
|
||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
import { commitAssets } from '../core/github/commitAssets';
|
import { commitAssets } from '../core/github/commitAssets';
|
||||||
@@ -9,8 +8,6 @@ export async function blitzkitTankIcons() {
|
|||||||
console.log('Building blitzkit tank icons...');
|
console.log('Building blitzkit tank icons...');
|
||||||
|
|
||||||
console.log('Starting website dev server...');
|
console.log('Starting website dev server...');
|
||||||
|
|
||||||
const child = exec('cd ../.. && bun dev:website');
|
|
||||||
const browser = await launch();
|
const browser = await launch();
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
const tanks = Object.values((await fetchTankDefinitions()).tanks);
|
const tanks = Object.values((await fetchTankDefinitions()).tanks);
|
||||||
@@ -44,7 +41,7 @@ export async function blitzkitTankIcons() {
|
|||||||
files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content });
|
files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content });
|
||||||
}
|
}
|
||||||
|
|
||||||
child.kill('SIGHUP');
|
await page.close();
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|
||||||
await commitAssets('tank icons', files);
|
await commitAssets('tank icons', files);
|
||||||
|
|||||||
Reference in new issue
Block a user