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

[docs] Build versions.json before mike deploy #3392

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

Varun-Dutta
Copy link
Contributor

Changes

  1. Moved code fore building versions.json before the mike deploy command
  2. Copy the versions.json to S3, then switch to gh-pages to upload new version
  3. Fixed typo in DJL_VERSION env in Copy files to S3 with the AWS CLI step

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.

@Varun-Dutta Varun-Dutta marked this pull request as ready for review August 6, 2024 10:57
@Varun-Dutta Varun-Dutta requested review from zachgk, frankfliu and a team as code owners August 6, 2024 10:57
@@ -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' }}
Copy link
Contributor

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

aws s3 cp versions.json s3://djl-ai/documentation/nightly/versions.json
git checkout -f gh-pages
Copy link
Contributor

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

versions="$versions, {\"version\":\"v$version\",\"title\":\"v$version\",\"aliases\":[]}"
done
versions="$versions]"
echo "$versions" | jq "." > "./versions.json"
Copy link
Contributor

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

@frankfliu frankfliu force-pushed the master branch 2 times, most recently from 170532b to 30e5d7b Compare August 7, 2024 21:23
@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.27%. Comparing base (d7c8a74) to head (30e5d7b).
Report is 3 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

❗ There is a different number of reports uploaded between BASE (d7c8a74) and HEAD (30e5d7b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (d7c8a74) HEAD (30e5d7b)
3 2
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.
📢 Have feedback on the report? Share it here.

@frankfliu frankfliu merged commit 135fc56 into deepjavalibrary:master Aug 7, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants