-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename blank.yml to Convert and Deploy DevelopLog to Jekyl…
…l.yml
- Loading branch information
1 parent
f14d11b
commit a6fec89
Showing
1 changed file
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 | ||
|
@@ -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")) | ||
|
@@ -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 | ||
|
@@ -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 #자신의 깃허브명으로 바꿔야 함 |