Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/mrgnw/cv.
Something went wrong. Try again.
cv pdf-commit-push.sh
1234567891011121314151617181920212223242526272829303132333435363738394041#!/bin/bash
# PDF Generation + Git Commit Script (Host Version)set -e
echo "🚀 Starting PDF generation and commit process..."
# Get current branchBRANCH=$(git rev-parse --abbrev-ref HEAD)echo "📍 Current branch: $BRANCH"
# Generate all PDFs using Dockerecho "📄 Generating all PDFs via Docker..."docker-compose exec app node pdf-cli.js --force all
# Check if there are any changesif git diff --quiet static/; then echo "ℹ️ No PDF changes detected, nothing to commit" exit 0fi
# Show what changedecho "📋 PDF changes detected:"git diff --name-only static/ | sed 's/^/ - /'
# Add PDF filesecho "➕ Adding PDF files to git..."git add static/*.pdf
# Commit with timestampTIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')COMMIT_MSG="Update PDFs - $TIMESTAMP"echo "💾 Committing: $COMMIT_MSG"git commit -m "$COMMIT_MSG"
# Push to current branchecho "🚀 Pushing to $BRANCH..."git push origin "$BRANCH"
echo "✅ PDF generation, commit, and push completed successfully!"