Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/create-course-from-json.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

jobs:
updateCourse:
upsertCourse:
runs-on: ubuntu-latest

# Run only if the PR was merged into main
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion praxis/math/CURRICULUM-PRAXIS-Core-Math.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down