Skip to content

Commit

Permalink
Disable history editing in CI
Browse files Browse the repository at this point in the history
Closes #456.
Closes #448.
  • Loading branch information
martinthomson committed Oct 28, 2024
1 parent cfbf1bd commit fa55a38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ghpages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ cleanup-ghpages: $(GHPAGES_ROOT)
git remote prune $$remote; \
done;

# Drop old ${PAGES_BRANCH} commits
ifneq (true,$(CI))
# Drop old ${PAGES_BRANCH} commits.
# Retain $(GHPAGES_COMMIT_TTL) days of history.
# Only run this if more than $(GHPAGES_COMMIT_TTL)*2 days of history exists.
@KEEP=$$((`date '+%s'`-($(GHPAGES_COMMIT_TTL)*86400))); \
Expand All @@ -109,6 +110,7 @@ cleanup-ghpages: $(GHPAGES_ROOT)
FILTER_BRANCH_SQUELCH_WARNING=1 git -C $(GHPAGES_ROOT) filter-branch ${PAGES_BRANCH}; \
fi \
fi
endif

# Clean up obsolete directories
# Keep old branches for $(GHPAGES_BRANCH_TTL) days after the last changes (on the ${PAGES_BRANCH} branch).
Expand Down

0 comments on commit fa55a38

Please sign in to comment.