laforceit-blog/public/blog/posts/push-blog.sh

24 lines
570 B
Bash
Executable File

#!/bin/bash
# Script to push blog content to Gitea with proper symlink handling
# This ensures actual content is pushed, not just symlinks
# Navigate to the blog repository
cd ~/Projects/laforceit-blog
# Configure git to handle symlinks correctly
git config --local core.symlinks true
# Add all changes, dereferencing symlinks to include the actual content
git add -A --dereference
# Get commit message from argument or use default
COMMIT_MSG=${1:-"Update blog content"}
# Commit changes
git commit -m "$COMMIT_MSG"
# Push to the repository
git push origin main