Skip to content

Commit

Permalink
Merge pull request #2 from zyang91/zyang91-patch-1
Browse files Browse the repository at this point in the history
Create cleanup.yml
  • Loading branch information
zyang91 authored Feb 9, 2025
2 parents be8a5b5 + d8dda82 commit 36edc5e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Clean Up

on:
push:
branches:
- main
- '**' # Apply to all branches
pull_request:
branches:
- main
- '**'

jobs:
remove-dsstore:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Configure Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "zyang91"
- name: Find and remove .DS_Store files
run: |
git rm --cached $(git ls-files | grep .DS_Store) || echo "No .DS_Store files found"
git commit -m "Remove .DS_Store files" || echo "No changes to commit"
- name: Find and remove .Rhistory files
run: |
git rm --cached $(git ls-files | grep .Rhistory) || echo "No .Rhistory files found"
git commit -m "Remove .Rhistory files" || echo "No changes to commit"
- name: Push changes to repository
run: |
git push origin HEAD || echo "No changes pushed"

0 comments on commit 36edc5e

Please sign in to comment.