-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cansavvy/edits
- Loading branch information
Showing
132 changed files
with
11,174 additions
and
4,516 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 |
---|---|---|
|
@@ -32,8 +32,8 @@ jobs: | |
- name: Make the branch fresh | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
branch_name='preview-${{ github.event.pull_request.number }}' | ||
echo branch doesnt exist | ||
|
@@ -47,6 +47,7 @@ jobs: | |
toggle_url_check: "${{ env.URL_CHECKER }}" | ||
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}" | ||
toggle_render_preview: "${{ env.RENDER_PREVIEW }}" | ||
toggle_make_labs: "${{ env.MAKE_LABS }}" | ||
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}" | ||
|
||
########################## Make the error reports ############################## | ||
|
@@ -84,17 +85,21 @@ jobs: | |
image: jhudsl/base_ottr:main | ||
|
||
steps: | ||
- name: Checkout files | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Run styler | ||
run: Rscript -e "styler::style_file(list.files(pattern = 'Rmd$', recursive = TRUE, full.names = TRUE));warnings()" | ||
|
||
- name: Commit styled files | ||
run: | | ||
git config --system --add safe.directory "$GITHUB_WORKSPACE" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add \*.Rmd | ||
git commit -m 'Style Rmds' || echo "No changes to commit" | ||
git push origin || echo "No changes to commit" | ||
|
@@ -128,8 +133,8 @@ jobs: | |
# Set up git checkout | ||
- name: Set up git checkout | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
branch_name='preview-${{ github.event.pull_request.number }}' | ||
git fetch --all | ||
|
@@ -160,6 +165,12 @@ jobs: | |
# Render module details for syllabus | ||
- name: Render module details for syllabus | ||
run: Rscript "scripts/render_module_details_for_syllabus.R" | ||
|
||
# Create blank labs - runs quickly, so just does it for all of them | ||
- name: Run lab converter | ||
if: ${{needs.yaml-check.outputs.toggle_make_labs == 'yes'}} | ||
shell: bash | ||
run: bash scripts/blank_labs_from_keys.sh | ||
|
||
# Render all module files | ||
- name: Render html of modules where .Rmd has changed | ||
|
@@ -259,6 +270,7 @@ jobs: | |
outputs: | ||
pdffiles: "${{ steps.getfiles.outputs.files }}" | ||
|
||
########################## PDFs ############################## | ||
|
||
render-pdf-lectures: | ||
name: Render pdf lecture slides | ||
|
@@ -287,8 +299,8 @@ jobs: | |
# Set up git checkout | ||
- name: Set up git checkout | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
branch_name='preview-${{ github.event.pull_request.number }}' | ||
git fetch --all | ||
|
@@ -314,7 +326,7 @@ jobs: | |
git add *.pdf --force | ||
git commit -m 'Render preview' || echo "No changes to commit" | ||
git status | ||
git merge -s recursive --strategy-option=ours origin/${{ github.head_ref }} --allow-unrelated-histories | ||
git pull --rebase --set-upstream origin $branch_name --allow-unrelated-histories --strategy-option=ours | ||
git push --force || echo "No changes to commit" | ||
shell: bash | ||
|
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 |
---|---|---|
|
@@ -23,6 +23,9 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
# Use the yaml-env-action action. | ||
- name: Load environment from YAML | ||
|
@@ -36,6 +39,9 @@ jobs: | |
make_book_txt: "${{ env.MAKE_BOOK_TXT }}" | ||
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}" | ||
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}" | ||
toggle_make_labs: "${{ env.MAKE_LABS }}" | ||
|
||
########################## Site ############################## | ||
|
||
render-main: | ||
name: Render Main Site and Materials | ||
|
@@ -85,6 +91,12 @@ jobs: | |
- name: Render module details for syllabus | ||
run: Rscript "scripts/render_module_details_for_syllabus.R" | ||
|
||
# Create blank labs - runs quickly, so just does it for all of them | ||
- name: Run lab converter | ||
if: ${{needs.yaml-check.outputs.toggle_make_labs == 'yes'}} | ||
shell: bash | ||
run: bash scripts/blank_labs_from_keys.sh | ||
|
||
# Render all module files | ||
- name: Render html of modules | ||
run: | | ||
|
@@ -127,8 +139,8 @@ jobs: | |
# Commit the rendered site files - html files and site_libs files | ||
- name: Commit rendered site files | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add . --force | ||
git commit -m 'Render site' || echo "No changes to commit" | ||
git pull --rebase --set-upstream origin main --allow-unrelated-histories --strategy-option=ours | ||
|
@@ -138,6 +150,7 @@ jobs: | |
outputs: | ||
pdffiles: "${{ steps.getfiles.outputs.files }}" | ||
|
||
########################## PDFs ############################## | ||
|
||
render-pdf-lectures: | ||
name: Render pdf lecture slides | ||
|
@@ -165,8 +178,8 @@ jobs: | |
# Set up git checkout | ||
- name: Set up git checkout | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git fetch --all | ||
git checkout main | ||
|
@@ -187,5 +200,5 @@ jobs: | |
git add *.pdf --force | ||
git commit -m 'Render pdfs' || echo "No changes to commit" | ||
git status | ||
git merge -s recursive --strategy-option=theirs origin/main --allow-unrelated-histories | ||
git pull --rebase --set-upstream origin main --allow-unrelated-histories --strategy-option=ours | ||
git push --force || echo "No changes to commit" |
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
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
Oops, something went wrong.