Skip to content

Commit

Permalink
Update and rename blank.yml to Convert and Deploy DevelopLog to Jekyl…
Browse files Browse the repository at this point in the history
…l.yml
  • Loading branch information
GoldenPearls authored Aug 27, 2024
1 parent f14d11b commit a6fec89
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Convert and Deploy GitBook to Jekyll
name: Convert and Deploy DevelopLog to Jekyll

on:
push:
Expand All @@ -10,11 +10,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout GitBook Repository
- name: Checkout Repository
uses: actions/checkout@v2
with:
repository: YourGitBookRepoOwner/YourGitBookRepoName
path: gitbook

- name: Setup Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -28,7 +25,7 @@ jobs:
- name: Convert Markdown to Jekyll Format
run: |
mkdir -p _posts
for file in $(find ./gitbook -name '*.md'); do
for file in $(find ./developLog -name '*.md'); do
filename=$(basename -- "$file")
title="${filename%.*}"
category=$(basename $(dirname "$file"))
Expand All @@ -51,6 +48,10 @@ jobs:
echo "---" >> $new_filename
cat "$file" >> $new_filename
# Add and commit each file with the title as the commit message
git add $new_filename
git commit -m "Add post: $title"
done
- name: Checkout GitHub Pages Repository
Expand All @@ -66,8 +67,8 @@ jobs:
- name: Commit and Push Changes
run: |
cd gh-pages
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global user.email "github-actions[bot]"
git config --global user.name "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Auto-commit converted files from GitBook"
git push origin main
git commit -m "Bulk commit of converted posts"
git push https://${{ secrets.GH_PAT }}@github.com/GoldenPearls/GoldenPearls.github.io.git #자신의 깃허브명으로 바꿔야 함

0 comments on commit a6fec89

Please sign in to comment.