Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
free
Browse files Browse the repository at this point in the history
  • Loading branch information
miloswrath committed Sep 16, 2024
1 parent 26a6927 commit c5c713b
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,6 @@ jobs:
# 4. (Optional) Commit and Push Generated Posts
# This step commits the newly created posts back to the repository.
# If you prefer to keep the repository clean and not include generated posts, you can omit this step.
- name: Commit and Push Posts
if: github.event_name == 'push' && steps.find_png.outputs.PNG_FILES != ''
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Add new posts to git
git add _posts/*.md
# Commit changes if there are any
if ! git diff --cached --exit-code > /dev/null; then
git commit -m "Add new posts for subjects $(date +%Y-%m-%d)"
git push origin main # Replace 'main' with your default branch if different
else
echo "No changes to commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.GIT_PAT }}

# 5. Set Up Ruby Environment
- name: Setup Ruby
Expand Down Expand Up @@ -234,7 +214,7 @@ jobs:
run: |
git config --global user.name "miloswrath"
git config --global user.email "[email protected]"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git remote set-url origin https://x-access-token:${{ secrets.GIT_PAT }}@github.com/$GITHUB_REPOSITORY
git add .
git commit -m "Automated commit by GitHub Actions"
git push
Expand Down

0 comments on commit c5c713b

Please sign in to comment.