Skip to content

.github/workflows/update-course-materials.yml #22

.github/workflows/update-course-materials.yml

.github/workflows/update-course-materials.yml #22

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 "[email protected]"
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