Skip to content

Commit

Permalink
Don't remove .github (#69)
Browse files Browse the repository at this point in the history
* Don't remove .github

* Don't remove .github
  • Loading branch information
Kludex authored Sep 22, 2024
1 parent f34ce26 commit af621ad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ jobs:
- name: Rename generated folder to a temporary name
run: |
GENERATED_FOLDER="${{ steps.repository.outputs.name }}"
mv $GENERATED_FOLDER temp_generated_folder
- name: Remove all files and directories in the root except temporary generated folder
run: find . -mindepth 1 ! -regex "^./\.git\(/.*\)?" ! -regex "^./temp_generated_folder\(/.*\)?" -delete
GENERATED_FOLDER="${{ steps.repository.outputs.name }}"
mv $GENERATED_FOLDER temp_generated_folder
- name: Remove all files and directories in the root except .git, .github, and temporary generated folder
run: find . -mindepth 1 ! -regex "^./\.git\(/.*\)?" ! -regex "^./\.github\(/.*\)?" ! -regex "^./temp_generated_folder\(/.*\)?" -delete

- name: Move generated project to root using rsync
run: |
rsync -av temp_generated_folder/ ./
rm -rf temp_generated_folder
rsync -av --exclude='.github' temp_generated_folder/ ./
rm -rf temp_generated_folder
- uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down

0 comments on commit af621ad

Please sign in to comment.