Skip to content

Commit

Permalink
Attempt #2 at making manuscript folder actually delete (#644)
Browse files Browse the repository at this point in the history
* Make an "old version" to test this

* Try a git fetch first

* Try another strategy

* Try committing after the delete

* Try git fetch origin

* git push --set-upstream origin/main

* git push -u
  • Loading branch information
cansavvy authored May 24, 2023
1 parent 7598d49 commit e8e301b
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/render-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ jobs:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
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 push origin main || echo "No changes to push"
git push -u origin main || echo "No changes to push"
render-tocless:
name: Render TOC-less version for Leanpub or Coursera
Expand Down Expand Up @@ -117,10 +118,11 @@ jobs:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
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 push origin main || echo "No changes to push"
git push -u origin main || echo "No changes to push"
render-leanpub:
name: Finish Leanpub prep
Expand Down Expand Up @@ -156,8 +158,17 @@ jobs:
--output_dir resources/chapt_screen_images)
# We want a fresh run of the renders each time
- name: Delete old manuscript/
run: rm -rf manuscript/
- name: Delete manuscript/
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
rm -rf manuscript/
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
git fetch origin
git add .
git commit -m 'Delete manuscript folder' || echo "No changes to commit"
git pull --allow-unrelated-histories --strategy-option=ours
git push -u origin main || echo "No changes to push"
- name: Run ottrpal::bookdown_to_embed_leanpub
if: needs.yaml-check.outputs.toggle_quiz_check == 'no'
Expand All @@ -182,11 +193,11 @@ jobs:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
mkdir -p manuscript
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
git add --force manuscript/*
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 --force --set-upstream origin main || echo "No changes to push"
render-coursera:
Expand Down Expand Up @@ -222,8 +233,10 @@ jobs:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git remote set-url origin https://${GH_PAT}@github.com/${GITHUB_REPOSITORY}
git fetch origin
git add --force manuscript/*
git add --force resources/*
git add --force docs/*
git commit -m 'Render Coursera quizzes' || echo "No changes to commit"
git push --force --set-upstream origin main || echo "No changes to push"
git pull --allow-unrelated-histories --strategy-option=ours
git push -u origin main || echo "No changes to push"

0 comments on commit e8e301b

Please sign in to comment.