From 5f1b302303e8a8d034bc7760f49fc8164f95476a Mon Sep 17 00:00:00 2001 From: Anish Ghale Date: Thu, 8 Jan 2026 22:48:15 +0545 Subject: [PATCH] Updated workflow file --- .github/workflows/create-course-from-json.yml | 15 ++++++++++++--- praxis/math/CURRICULUM-PRAXIS-Core-Math.json | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-course-from-json.yml b/.github/workflows/create-course-from-json.yml index 3aa1f56..e9e8081 100644 --- a/.github/workflows/create-course-from-json.yml +++ b/.github/workflows/create-course-from-json.yml @@ -7,7 +7,7 @@ on: - main jobs: - updateCourse: + upsertCourse: runs-on: ubuntu-latest # Run only if the PR was merged into main @@ -40,10 +40,19 @@ jobs: echo "----------------------------------------" echo "Processing file: $FILE" - # Old content (empty if new file) + # Old content (exists for modified or deleted files) OLD_CONTENT=$(git show HEAD^:"$FILE" 2>/dev/null || echo "{}") - OLD_HASH=$(echo "$OLD_CONTENT" | jq -c . | sha256sum | awk '{print $1}') + + # Handle deleted files safely + if [ ! -f "$FILE" ]; then + echo "File was deleted: $FILE" + echo "Old hash: $OLD_HASH" + echo "Skipping deleted file." + continue + fi + + # New content exists NEW_HASH=$(jq -c . "$FILE" | sha256sum | awk '{print $1}') echo "Old hash: $OLD_HASH" diff --git a/praxis/math/CURRICULUM-PRAXIS-Core-Math.json b/praxis/math/CURRICULUM-PRAXIS-Core-Math.json index 5f12c24..6c54488 100644 --- a/praxis/math/CURRICULUM-PRAXIS-Core-Math.json +++ b/praxis/math/CURRICULUM-PRAXIS-Core-Math.json @@ -79,7 +79,7 @@ "title": "Fractions - Concepts and Operations", "sources": [ { - "title": "Everything to know about FRACTIONS in 30 minutes!", + "title": "Everything to know about FRACTIONS in 30 minutes!!", "url": "https://www.youtube.com/watch?v=8XmhGjgsiVc", "type": "video" },