Update from https://github.com/itu-helper/data-updater/commit/177acc3… #9852
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: Clear History | |
on: | |
push: | |
jobs: | |
refresh_lessons: | |
runs-on: ubuntu-latest | |
steps: | |
# When we are pushing course plans and courses, there are two commits. If we don't wait, | |
# the first clear history overrides the seconds push from the data-updater repo. | |
- name: Sleep for 1 minute | |
run: sleep 60s | |
shell: bash | |
# Clones the repo | |
- name: Checkout Repo Content | |
uses: actions/checkout@v2 | |
# Clears the history | |
- name: Clear History | |
run: | | |
git config --global user.email "data-updater@itu-helper.com" | |
git config --global user.name "ITU Helper" | |
git checkout --orphan latest_branch | |
git add -A | |
git commit -am "Cleared History." | |
git branch -D main | |
git branch -m main | |
git push -f origin main | |