Merge pull request #25 from pep-dortmund/minted_in_latex #23
  
    
      This file contains hidden or 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
    
  
  
    
  | # inspired by: | |
| # https://github.com/JetBrains/intellij-platform-plugin-template/blob/main/.github/workflows/template-cleanup.yml | |
| name: Template Cleanup | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| # Run a cleaning process only if the workflow is triggered by the non-"toolbox-workshop-protocol-template" repository. | |
| template-cleanup: | |
| name: Template Cleanup | |
| runs-on: ubuntu-latest | |
| if: github.event.repository.name != 'toolbox-workshop-protocol-template' | |
| permissions: | |
| contents: write | |
| steps: | |
| # Check out the current repository | |
| - name: Fetch Sources | |
| uses: actions/checkout@v4 | |
| # Cleanup project | |
| - name: Cleanup | |
| run: | | |
| mv README.md notes.md | |
| rm -rf .github | |
| rm -f environment.yml | |
| touch README.md | |
| NAME="${GITHUB_REPOSITORY##*/}" | |
| echo "# $NAME" >> README.md | |
| echo "Generated from [toolbox-workshop-protocol-template](https://github.com/pep-dortmund/toolbox-workshop-protocol-template)." >> README.md | |
| echo -e "\nFind more information in [notes.md](notes.md)." >> README.md | |
| # Commit modified files | |
| - name: Commit files | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add . | |
| git commit -m "Template cleanup" | |
| # Push changes | |
| - name: Push changes | |
| uses: ad-m/github-push-action@master | |
| with: | |
| branch: main | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |