Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comprehensive preview add #729

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading