33
33
- name : Make the branch fresh
34
34
run : |
35
35
git config --global --add safe.directory $GITHUB_WORKSPACE
36
- git config --global user.email "[email protected] "
37
- git config --global user.name "jhudsl-robot"
36
+ git config --global user.name 'github-actions[bot]'
37
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
38
38
39
39
branch_name='preview-${{ github.event.pull_request.number }}'
40
40
echo branch doesnt exist
@@ -130,8 +130,8 @@ jobs:
130
130
- name : Set up git checkout
131
131
run : |
132
132
git config --global --add safe.directory $GITHUB_WORKSPACE
133
- git config --global user.email "[email protected] "
134
- git config --global user.name "jhudsl-robot"
133
+ git config --global user.name 'github-actions[bot]'
134
+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
135
135
136
136
branch_name='preview-${{ github.event.pull_request.number }}'
137
137
git fetch --all
@@ -160,6 +160,9 @@ jobs:
160
160
echo Toc-less status ${{steps.tocless.outcome}}
161
161
exit 1
162
162
163
+ - name : Website preview for download
164
+ run : zip website-preview.zip docs/* -r
165
+
163
166
# Commit the rendered bookdown files
164
167
- name : Commit rendered bookdown files to preview branch
165
168
id : commit
@@ -188,6 +191,8 @@ jobs:
188
191
bookdown_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/index.html")
189
192
tocless_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/no_toc/index.html")
190
193
docx_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/docs/$course_name.docx")
194
+ zip_link=$(echo "https://github.com/$GITHUB_REPOSITORY/raw/preview-${{ github.event.pull_request.number }}/website-preview.zip")
195
+ echo "zip_link=$zip_link" >> $GITHUB_OUTPUT
191
196
echo "bookdown_link=$bookdown_link" >> $GITHUB_OUTPUT
192
197
echo "tocless_link=$tocless_link" >> $GITHUB_OUTPUT
193
198
echo "docx_link=$docx_link" >> $GITHUB_OUTPUT
@@ -203,11 +208,13 @@ jobs:
203
208
issue-number : ${{ github.event.pull_request.number }}
204
209
body : |
205
210
Re-rendered previews from the latest commit:
206
- - See [preview of Bookdown here](${{ steps.build-components.outputs.bookdown_link }})
207
- - See [preview of Coursera/Leanpub version here](${{ steps.build-components.outputs.tocless_link }})
208
- - Download the [preview of .docx file](${{ steps.build-components.outputs.docx_link }})
211
+ - :eyes: Quick [preview of course website here](${{ steps.build-components.outputs.bookdown_link }}) \*
212
+ - :microscope: Comprehensive [download of the course website here](${{ steps.build-components.outputs.zip_link }})
213
+ - Download the [.docx file](${{ steps.build-components.outputs.docx_link }})
209
214
210
- _Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
215
+ \* note not all html features will be properly displayed in the "quick preview" but it will give you a rough idea.
216
+
217
+ _Updated at ${{ steps.build-components.outputs.time }} with changes from the latest commit ${{ steps.build-components.outputs.commit_id }}_
211
218
edit-mode : replace
212
219
213
220
- name : Comment if no changes
0 commit comments