From 5c6a1a1f297337fb76e7eaacdcefc2fa24d3ed17 Mon Sep 17 00:00:00 2001 From: cansavvy Date: Mon, 25 Mar 2024 19:21:52 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=84=20Synced=20local=20'.github/wo?= =?UTF-8?q?rkflows/'=20with=20remote=20'.github/workflows/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release-2.01 --- .github/workflows/check-url.yml | 4 ++-- .github/workflows/pull_request.yml | 23 +++++++++++++++-------- .github/workflows/render-all.yml | 24 ++++++++++++------------ 3 files changed, 29 insertions(+), 22 deletions(-) diff --git a/.github/workflows/check-url.yml b/.github/workflows/check-url.yml index e3f2645..a437049 100644 --- a/.github/workflows/check-url.yml +++ b/.github/workflows/check-url.yml @@ -45,8 +45,8 @@ jobs: - name: Make the branch fresh run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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' echo branch doesnt exist git checkout -b preview-spell-error || echo branch exists diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 781c439..d81d780 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -33,8 +33,8 @@ jobs: - name: Make the branch fresh run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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 @@ -130,8 +130,8 @@ jobs: - name: Set up git checkout run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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 }}' git fetch --all @@ -160,6 +160,9 @@ jobs: echo Toc-less status ${{steps.tocless.outcome}} exit 1 + - name: Website preview for download + run: zip website-preview.zip docs/* -r + # Commit the rendered bookdown files - name: Commit rendered bookdown files to preview branch id: commit @@ -188,6 +191,8 @@ jobs: bookdown_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/index.html") tocless_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/no_toc/index.html") docx_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/docs/$course_name.docx") + zip_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/website-preview.zip") + echo "zip_link=$zip_link" >> $GITHUB_OUTPUT echo "bookdown_link=$bookdown_link" >> $GITHUB_OUTPUT echo "tocless_link=$tocless_link" >> $GITHUB_OUTPUT echo "docx_link=$docx_link" >> $GITHUB_OUTPUT @@ -203,11 +208,13 @@ jobs: issue-number: ${{ github.event.pull_request.number }} body: | Re-rendered previews from the latest commit: - - See [preview of Bookdown here](${{ steps.build-components.outputs.bookdown_link }}) - - See [preview of Coursera/Leanpub version here](${{ steps.build-components.outputs.tocless_link }}) - - Download the [preview of .docx file](${{ steps.build-components.outputs.docx_link }}) + - :eyes: Quick [preview of course website here](${{ steps.build-components.outputs.bookdown_link }}) \* + - :microscope: Comprehensive [download of the course website here](${{ steps.build-components.outputs.zip_link }}) + - Download the [.docx file](${{ steps.build-components.outputs.docx_link }}) - _Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_ + \* note not all html features will be properly displayed in the "quick preview" but it will give you a rough idea. + + _Updated at ${{ steps.build-components.outputs.time }} with changes from the latest commit ${{ steps.build-components.outputs.commit_id }}_ edit-mode: replace - name: Comment if no changes diff --git a/.github/workflows/render-all.yml b/.github/workflows/render-all.yml index 052d7f1..12643d8 100644 --- a/.github/workflows/render-all.yml +++ b/.github/workflows/render-all.yml @@ -49,11 +49,11 @@ jobs: fetch-depth: 0 token: ${{ secrets.GH_PAT }} - - name: Login as jhudsl-robot + - name: Login as github actions bot run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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' # We want a fresh run of the renders each time - name: Delete old docs/* @@ -101,11 +101,11 @@ jobs: fetch-depth: 0 token: ${{ secrets.GH_PAT }} - - name: Login as jhudsl-robot + - name: Login as github-actions bot run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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' # Rendered content for Leanpub and Coursera is very similar. # This job creates a shared scaffold for both. @@ -140,11 +140,11 @@ jobs: fetch-depth: 0 token: ${{ secrets.GH_PAT }} - - name: Login as jhudsl-robot + - name: Login as github actions bot run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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' # Create screenshots - name: Run the screenshot creation @@ -217,11 +217,11 @@ jobs: fetch-depth: 0 token: ${{ secrets.GH_PAT }} - - name: Login as jhudsl-robot + - name: Login as github action run: | git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global user.email "itcrtrainingnetwork@gmail.com" - 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' # Run Coursera version - name: Convert Leanpub quizzes to Coursera From 505457f8dbe720f25b4f4debcee0c847f8a66515 Mon Sep 17 00:00:00 2001 From: cansavvy Date: Mon, 25 Mar 2024 19:21:52 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=84=20Synced=20local=20'resources/?= =?UTF-8?q?exclude=5Ffiles.txt'=20with=20remote=20'resources/exclude=5Ffil?= =?UTF-8?q?es.txt'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit release-2.01 --- resources/exclude_files.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/exclude_files.txt b/resources/exclude_files.txt index 0e86813..5525a40 100644 --- a/resources/exclude_files.txt +++ b/resources/exclude_files.txt @@ -2,7 +2,7 @@ About.Rmd docs/* style-sets/* manuscript/* +CONTRIBUTING.md +LICENSE.md code_of_conduct.md README.md -README-template.md -reproducibility-checklist.md