.github/workflows/update-course-materials.yml #23
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
on: | |
workflow_dispatch: | |
push: | |
branches: main | |
paths: | |
- 'course_materials/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Zip Course materials | |
run: | | |
rm course_materials.zip | |
cd course_materials | |
zip -r ../course_materials.zip . | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: course_materials | |
path: course_materials.zip | |
- name: Commit files | |
run: | | |
git config --local user.email "github@uu.nl" | |
git config --local user.name "GitHub Utrecht University" | |
git add . | |
git commit -m "Update course materials" | |
continue-on-error: true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true |