Skip to content

Commit b276081

Browse files
authored
Merge pull request #124 from GetTechAPI/chore/pages-exclude-games
fix(pages): exclude game dump from deployment
2 parents 16661e4 + e20384d commit b276081

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ jobs:
4545
run: |
4646
mkdir -p _site
4747
cp -r site/dist/. _site/
48+
# Games remain versioned static source data in this repository, but
49+
# publishing nearly one million per-record files exceeds the fixed
50+
# GitHub Pages deployment window. Keep the public homepage artifact
51+
# to the collections it can serve reliably.
52+
rm -rf _site/v1/games
53+
node <<'NODE'
54+
const fs = require("fs");
55+
const path = "_site/v1/index.json";
56+
const manifest = JSON.parse(fs.readFileSync(path, "utf8"));
57+
delete manifest.collections?.games;
58+
fs.writeFileSync(path, JSON.stringify(manifest, null, 2) + "\n");
59+
NODE
4860
touch _site/.nojekyll
4961
5062
- uses: actions/upload-pages-artifact@v3
@@ -60,7 +72,3 @@ jobs:
6072
steps:
6173
- id: deployment
6274
uses: actions/deploy-pages@v4
63-
with:
64-
# The game dump contains nearly one million static records. Pages can
65-
# remain in syncing_files beyond the action's 10-minute default.
66-
timeout: 1800000

0 commit comments

Comments
 (0)