-
Notifications
You must be signed in to change notification settings - Fork 679
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
[docs] Build versions.json before mike deploy #3392
Conversation
.github/workflows/docs.yml
Outdated
@@ -91,10 +91,11 @@ jobs: | |||
|
|||
- name: Copy files to S3 with the AWS CLI | |||
env: | |||
DJL_VERSION: ${{ github.event.inputs.pt_version || 'master' }} | |||
DJL_VERSION: ${{ github.event.inputs.version-number || 'master' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid using master
branch for PR, better create a new branch
.github/workflows/docs.yml
Outdated
aws s3 cp versions.json s3://djl-ai/documentation/nightly/versions.json | ||
git checkout -f gh-pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better move this into shell script
tools/scripts/build-website.sh
Outdated
versions="$versions, {\"version\":\"v$version\",\"title\":\"v$version\",\"aliases\":[]}" | ||
done | ||
versions="$versions]" | ||
echo "$versions" | jq "." > "./versions.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid use ./, the script should be able to execute in any directory
170532b
to
30e5d7b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files@@ Coverage Diff @@
## master #3392 +/- ##
=============================================
- Coverage 72.86% 58.27% -14.60%
+ Complexity 7352 5740 -1612
=============================================
Files 668 668
Lines 32509 32509
Branches 3439 3439
=============================================
- Hits 23688 18943 -4745
- Misses 7207 12119 +4912
+ Partials 1614 1447 -167 ☔ View full report in Codecov by Sentry. |
Changes
Rationale:
I re-ordered the steps so the workflow would crash if there was an issue with creating the versions.json file before building all the documentation. The code responsible for building the versions.json was unable to access the .toml file from gh-pages. Thus, I refactored the code to generate and upload the versions.json file before uploading the new website directory.