fix #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |