Skip to content

Storybook: Add scheduled cleanup workflow#33522

Open
r-farkhutdinov wants to merge 1 commit intoDevExpress:26_1from
r-farkhutdinov:26_1_gh_pages_cleanup_job
Open

Storybook: Add scheduled cleanup workflow#33522
r-farkhutdinov wants to merge 1 commit intoDevExpress:26_1from
r-farkhutdinov:26_1_gh_pages_cleanup_job

Conversation

@r-farkhutdinov
Copy link
Copy Markdown
Contributor

No description provided.

@r-farkhutdinov r-farkhutdinov self-assigned this May 7, 2026
@r-farkhutdinov r-farkhutdinov marked this pull request as ready for review May 7, 2026 14:37
@r-farkhutdinov r-farkhutdinov requested a review from a team as a code owner May 7, 2026 14:37
Copilot AI review requested due to automatic review settings May 7, 2026 14:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions maintenance workflow to keep the gh-pages branch tidy by periodically deleting stale Storybook PR preview folders under preview/pr-* and pushing the removals back to gh-pages.

Changes:

  • Introduces a scheduled (weekly) + manual (workflow_dispatch) cleanup workflow.
  • Implements age detection via git log timestamp per preview folder and removes folders older than 7 days.
  • Commits and pushes removals directly to the gh-pages branch.

Comment on lines +42 to +43
git rm -rf "$dir"
DELETED=$((DELETED + 1))
Comment on lines +51 to +57
- name: Commit and push removals
if: steps.cleanup.outputs.deleted != '0'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "chore: remove ${{ steps.cleanup.outputs.deleted }} stale PR preview(s) [skip ci]"
git push origin gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants