Skip to content

Commit

Permalink
Add zipped downloadable preview files
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Mar 11, 2024
1 parent 8fd8ba9 commit 1c3a5e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ jobs:
echo site status ${{steps.site.outcome}}
exit 1
- name: Website preview for download
run: zip website-preview.zip docs/* -r

# Commit the rendered website files
- name: Commit rendered website files to preview branch
id: commit
Expand All @@ -123,9 +126,6 @@ jobs:
git push --force || echo "No changes to commit"
shell: bash

- name: Website preview for download
run: zip website-preview.zip docs/* -r

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
Expand All @@ -145,6 +145,7 @@ jobs:
run: |
course_name=$(head -n 1 _website.yml | cut -d'"' -f 2| tr " " "-")
website_link=$(echo "https://htmlpreview.github.io/?https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/docs/index.html")
docs_link=$echo "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/preview-${{ github.event.pull_request.number }}/website-preview.zip"
echo ::set-output name=website_link::$website_link
echo ::set-output name=time::$(date +'%Y-%m-%d')
echo ::set-output name=commit_id::$GITHUB_SHA
Expand All @@ -157,7 +158,8 @@ jobs:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Re-rendered previews from the latest commit: See [preview of website here](${{ steps.build-components.outputs.website_link }})
Quick preview for the latest commit: See [preview of website here](${{ steps.build-components.outputs.website_link }})
Comprehensive [downloadable preview files](${{ steps.build-components.outputs.docs_link}})
_Updated at ${{ steps.build-components.outputs.time }} with changes from ${{ steps.build-components.outputs.commit_id }}_
edit-mode: replace
Expand Down

0 comments on commit 1c3a5e0

Please sign in to comment.