diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b52e160a..afddea82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: - run: npm run jestTest -- -t ${{ matrix.mcVersion }} - uses: actions/upload-artifact@v4 with: - name: test_picture-${{ github.run_id }}-${{ github.job }} + name: test_picture path: test/test_*.png DeployPages: runs-on: ubuntu-latest @@ -57,7 +57,7 @@ jobs: - name: Download build uses: actions/download-artifact@v4.1.7 with: - name: test_picture-${{ github.run_id }}-${{ github.job }} + name: test_picture - name: Create commits run: | git config user.name 'rom1504bot' diff --git a/viewer/prerender.js b/viewer/prerender.js index 8f525adb..c5d6a385 100644 --- a/viewer/prerender.js +++ b/viewer/prerender.js @@ -18,7 +18,15 @@ const supportedVersions = require('./lib/version').supportedVersions for (const version of supportedVersions) { const assets = mcAssets(version) + // Check if assets is null or undefined + if (!assets) { + console.log('Error: assets is null or undefined') + } const atlas = makeTextureAtlas(assets) + // Check if atlas is null or undefined + if (!atlas) { + console.log('Error: atlas is null or undefined') + } const out = fs.createWriteStream(path.resolve(texturesPath, version + '.png')) const stream = atlas.canvas.pngStream() stream.on('data', (chunk) => out.write(chunk))