From ceeb113be54399beb0472ae0d29c4bee0606998b Mon Sep 17 00:00:00 2001 From: AM Hoffman Date: Thu, 30 May 2024 17:26:44 -0400 Subject: [PATCH 1/3] Add rebase flag --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d81d7802..2e122ba7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -172,7 +172,7 @@ jobs: echo "changes=$changes" >> $GITHUB_OUTPUT git add . --force git commit -m 'Render preview' || echo "No changes to commit" - git pull --set-upstream origin $branch_name --allow-unrelated-histories --strategy-option=ours + git pull --rebase --set-upstream origin $branch_name --allow-unrelated-histories --strategy-option=ours git push --force || echo "No changes to commit" shell: bash From bce732d00a8636fb593c6c8e45f5faa12cd28645 Mon Sep 17 00:00:00 2001 From: AM Hoffman Date: Thu, 30 May 2024 17:30:18 -0400 Subject: [PATCH 2/3] Update render-all.yml - add rebase flag --- .github/workflows/render-all.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml index 12643d87..45e2fed6 100644 --- a/.github/workflows/render-all.yml +++ b/.github/workflows/render-all.yml @@ -83,7 +83,7 @@ jobs: git fetch origin git add --force docs/* git commit -m 'Render bookdown' || echo "No changes to commit" - git pull --allow-unrelated-histories --strategy-option=ours + git pull --rebase --allow-unrelated-histories --strategy-option=ours git push -u origin main || echo "No changes to push" render-tocless: @@ -122,7 +122,7 @@ jobs: git fetch origin git add --force docs/no_toc* git commit -m 'Render toc-less' || echo "No changes to commit" - git pull --allow-unrelated-histories --strategy-option=ours + git pull --rebase --allow-unrelated-histories --strategy-option=ours git push -u origin main || echo "No changes to push" render-leanpub: @@ -199,7 +199,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 pull --rebase --allow-unrelated-histories --strategy-option=ours git push --force --set-upstream origin main || echo "No changes to push" render-coursera: @@ -244,5 +244,5 @@ 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 pull --rebase --allow-unrelated-histories --strategy-option=ours git push -u origin main || echo "No changes to push" From 2d37cd4b421609ac017273cf175337cb048c8a19 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Tue, 4 Jun 2024 13:35:35 -0400 Subject: [PATCH 3/3] Change to less nuclear solution --- .github/workflows/render-all.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml index 45e2fed6..ad299a07 100644 --- a/.github/workflows/render-all.yml +++ b/.github/workflows/render-all.yml @@ -83,12 +83,12 @@ jobs: git fetch origin git add --force docs/* git commit -m 'Render bookdown' || echo "No changes to commit" - git pull --rebase --allow-unrelated-histories --strategy-option=ours + git pull --allow-unrelated-histories --strategy-option=ours git push -u origin main || echo "No changes to push" render-tocless: name: Render TOC-less version for Leanpub or Coursera - needs: [yaml-check] + needs: [render-bookdown] runs-on: ubuntu-latest container: image: ${{needs.yaml-check.outputs.rendering_docker_image}} @@ -122,12 +122,12 @@ jobs: git fetch origin git add --force docs/no_toc* git commit -m 'Render toc-less' || echo "No changes to commit" - git pull --rebase --allow-unrelated-histories --strategy-option=ours + git pull --allow-unrelated-histories --strategy-option=ours git push -u origin main || echo "No changes to push" render-leanpub: name: Finish Leanpub prep - needs: [yaml-check, render-tocless] + needs: [render-tocless] runs-on: ubuntu-latest container: image: jhudsl/ottrpal:main @@ -199,12 +199,12 @@ jobs: git add --force resources/* git add --force docs/* git commit -m 'Render Leanpub' || echo "No changes to commit" - git pull --rebase --allow-unrelated-histories --strategy-option=ours + git pull --allow-unrelated-histories --strategy-option=ours git push --force --set-upstream origin main || echo "No changes to push" render-coursera: name: Finish Coursera prep - needs: [yaml-check, render-tocless] + needs: [render-tocless] runs-on: ubuntu-latest container: image: ${{needs.yaml-check.outputs.rendering_docker_image}} @@ -244,5 +244,5 @@ jobs: git add --force resources/* git add --force docs/* git commit -m 'Render Coursera quizzes' || echo "No changes to commit" - git pull --rebase --allow-unrelated-histories --strategy-option=ours + git pull --allow-unrelated-histories --strategy-option=ours git push -u origin main || echo "No changes to push"