From 5b979bacec8e35bc75d9faa1355f5e9994234c85 Mon Sep 17 00:00:00 2001 From: Miao YU Date: Tue, 14 Jan 2025 10:02:13 -0500 Subject: [PATCH] Update main.yml clean up old updates back to 3 years --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2439d67dc6..126072f4c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,9 +33,13 @@ jobs: - name: Fetch RSS run: | Rscript R/fetch.R + - name: Clean up old updates + run: | + find content/post/ -type f -mtime +1096 -delete - name: Push results run: | git add --all * git commit -m "Daily Update" git push -q https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:master +