From 60a1027f5d48e1440cb3198d67af750b43e892db Mon Sep 17 00:00:00 2001 From: Zanger67 Date: Fri, 26 Jul 2024 18:34:50 -0700 Subject: [PATCH] Updating method to make use of cloning instead of submodules --- action.yml | 22 ++++++++++++---------- main.ipynb | 2 +- main.py | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/action.yml b/action.yml index e6e70ac..e197c2e 100644 --- a/action.yml +++ b/action.yml @@ -32,16 +32,18 @@ runs: - name: Pull current version of markdown generator | Cloning if not present shell: bash run: | - if [ -d .readme_updater/ ]; then - echo "Submodule exists." - else - echo "Submodule not found. Adding..." - git submodule add https://github.com/Zanger67/Leetcode-Progress-Tracker.git '.readme_updater' - fi + git clone --recurse-submodules https://github.com/Zanger67/Leetcode-Progress-Tracker.git '.readme_updater' + + # if [ -d .readme_updater/ ]; then + # echo "Submodule exists." + # else + # echo "Submodule not found. Adding..." + # git submodule add https://github.com/Zanger67/Leetcode-Progress-Tracker.git '.readme_updater' + # fi - echo "Initializing and updating submodules..." - git submodule update --init --recursive - git submodule update --recursive --remote + # echo "Initializing and updating submodules..." + # git submodule update --init --recursive + # git submodule update --recursive --remote # cd .readme_updater @@ -109,7 +111,7 @@ runs: run: | git config --global user.name "Zanger67/leetcode" git config --global user.email "Zanger67[bot]@Zanger67.github.io" - git add . + git add -- . ':!.readme_updater' git commit -m 'Updated markdown files' || exit 0 git push diff --git a/main.ipynb b/main.ipynb index dc9cd4c..493d85e 100644 --- a/main.ipynb +++ b/main.ipynb @@ -1766,7 +1766,7 @@ " with open(readmePath, 'w') as file :\n", " username = getenv('LEETCODE_USERNAME')\n", " file.write(f'# **[LeetCode Records](https://leetcode.com/u/{username}/)** ({qSolvedHeader})\\n\\n')\n", - " \n", + " file.write(f'')\n", " file.write(f'> My LeetCode Profile: [{username}](https://leetcode.com/u/{username}/)\\n')\n", " \n", " # if difficultyBasedMarkdowns :\n", diff --git a/main.py b/main.py index 2ea7d18..5eb736a 100644 --- a/main.py +++ b/main.py @@ -1511,7 +1511,7 @@ def exportPrimaryReadme(dfQuestions: DataFrame, with open(readmePath, 'w') as file : username = getenv('LEETCODE_USERNAME') file.write(f'# **[LeetCode Records](https://leetcode.com/u/{username}/)** ({qSolvedHeader})\n\n') - + file.write(f'') file.write(f'> My LeetCode Profile: [{username}](https://leetcode.com/u/{username}/)\n') # if difficultyBasedMarkdowns :