Skip to content

Commit 2ebec99

Browse files
authored
Update build.yml
1 parent a5547c9 commit 2ebec99

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ jobs:
3333
wget https://github.com/zineland/zine/releases/download/$ZINE_VERSION/zine-x86_64-unknown-linux-gnu.tar.gz -O zine.tar.gz
3434
tar xvf zine.tar.gz
3535
./zine build
36+
- name: Check for symlinks and hard links
37+
run: |
38+
if find ./build -type l | grep .; then
39+
echo "Error: Symlinks found in build output. Remove them before deploying."
40+
exit 1
41+
fi
42+
if find ./build ! -type d -links +1 | grep .; then
43+
echo "Error: Hard links found in build output. Remove them before deploying."
44+
exit 1
45+
fi
46+
- name: Check build size
47+
run: |
48+
du -sh ./build
49+
size=$(du -s ./build | cut -f1)
50+
if [ "$size" -gt 10485760 ]; then # 10GB in KB
51+
echo "Error: Build artifact exceeds 10GB limit."
52+
exit 1
53+
fi
3654
- name: Upload artifact
3755
uses: actions/upload-artifact@v4
3856
with:
@@ -48,4 +66,4 @@ jobs:
4866
steps:
4967
- name: Deploy to GitHub Pages
5068
id: deployment
51-
uses: actions/deploy-pages@v4
69+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)