From 6d08fa5d671c17351927f8aab9c35d63b89630e2 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Wed, 24 May 2023 11:59:08 -0400 Subject: [PATCH 1/3] Make an "old version" to test this --- .github/workflows/render-all.yml | 4 ++-- manuscript/2-old-version-chapter.md | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 manuscript/2-old-version-chapter.md diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml index 7e2aa8e89..0eb33fba7 100644 --- a/.github/workflows/render-all.yml +++ b/.github/workflows/render-all.yml @@ -139,6 +139,7 @@ jobs: - name: Login as jhudsl-robot run: | + git config --global --add safe.directory $GITHUB_WORKSPACE git config --local user.email "itcrtrainingnetwork@gmail.com" git config --local user.name "jhudsl-robot" @@ -186,8 +187,7 @@ jobs: git add --force resources/* git add --force docs/* git commit -m 'Render Leanpub' || echo "No changes to commit" - git pull --allow-unrelated-histories --strategy-option=ours - git push origin main || echo "No changes to push" + git push --force origin main || echo "No changes to push" render-coursera: name: Finish Coursera prep diff --git a/manuscript/2-old-version-chapter.md b/manuscript/2-old-version-chapter.md new file mode 100644 index 000000000..7b11214be --- /dev/null +++ b/manuscript/2-old-version-chapter.md @@ -0,0 +1,7 @@ +# 2 A new chapter + +{type: iframe, title:2 A new chapter, width:800, height:600, poster:resources/chapt_screen_images/a-new-chapter.png} +![](https://jhudatascience.org/OTTR_Template/no_toc/a-new-chapter.html) + + + From e57817c499a51164abcb4b29e88d20ea35f7f915 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Wed, 24 May 2023 12:18:34 -0400 Subject: [PATCH 2/3] Try a git fetch first --- .github/workflows/render-all.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml index 0eb33fba7..3cea26768 100644 --- a/.github/workflows/render-all.yml +++ b/.github/workflows/render-all.yml @@ -140,8 +140,8 @@ jobs: - name: Login as jhudsl-robot run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --local user.email "itcrtrainingnetwork@gmail.com" - git config --local user.name "jhudsl-robot" + git config --global user.email "itcrtrainingnetwork@gmail.com" + git config --global user.name "jhudsl-robot" # Create screenshots - name: Run the screenshot creation @@ -187,6 +187,7 @@ jobs: git add --force resources/* git add --force docs/* git commit -m 'Render Leanpub' || echo "No changes to commit" + git fetch git push --force origin main || echo "No changes to push" render-coursera: @@ -206,8 +207,9 @@ jobs: - name: Login as jhudsl-robot run: | - git config --local user.email "itcrtrainingnetwork@gmail.com" - git config --local user.name "jhudsl-robot" + git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global user.email "itcrtrainingnetwork@gmail.com" + git config --global user.name "jhudsl-robot" # Run Coursera version - name: Convert Leanpub quizzes to Coursera From 64f6b5e3a2a22d7ce8f9513d99bd371d45db3062 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Wed, 24 May 2023 12:28:35 -0400 Subject: [PATCH 3/3] Try another strategy --- .github/workflows/render-all.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml index 3cea26768..a8929d5d1 100644 --- a/.github/workflows/render-all.yml +++ b/.github/workflows/render-all.yml @@ -187,8 +187,7 @@ jobs: git add --force resources/* git add --force docs/* git commit -m 'Render Leanpub' || echo "No changes to commit" - git fetch - git push --force origin main || echo "No changes to push" + git push --force --set-upstream origin main || echo "No changes to push" render-coursera: name: Finish Coursera prep @@ -227,5 +226,4 @@ jobs: git add --force resources/* git add --force docs/* git commit -m 'Render Coursera quizzes' || echo "No changes to commit" - git pull --allow-unrelated-histories --strategy-option=ours - git push origin main || echo "No changes to push" + git push --force --set-upstream origin main || echo "No changes to push"