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] update docs.yml and docs workflow to support versioning #3365

Merged
merged 4 commits into from
Aug 5, 2024

Conversation

Varun-Dutta
Copy link
Contributor

@Varun-Dutta Varun-Dutta commented Jul 26, 2024

Chages to mkdocs.yml

  1. Added the parameter "site_dir" as required by mike
  2. Added mike to the required plugins to support versioning

Changes to docs workflow

  1. Added a parameter for new version
  2. Added cache for IJava Kernel
  3. Updated git clone to actions/checkout@v4
  4. Implemented build-website.sh script to build the website

Changes to build-website.sh

  1. Utilize mike to build versioned website
  2. Use jq to automate updating the versions.json file

Testing:

  1. Downloaded the updated website from Gamma S3 Bucket to local directory. Ran the website locally.

TODO

  • Upload index.html file that re-directs to master documentation
  • Verify versioning works correctly in production environment
  • Remove any remaining artifacts from the previous website

.github/workflows/docs.yml Show resolved Hide resolved
.github/workflows/docs.yml Outdated Show resolved Hide resolved
.github/workflows/docs.yml Outdated Show resolved Hide resolved
.github/workflows/docs.yml Outdated Show resolved Hide resolved
.github/workflows/docs.yml Outdated Show resolved Hide resolved
.github/workflows/docs.yml Outdated Show resolved Hide resolved
@frankfliu frankfliu force-pushed the master branch 2 times, most recently from 4e9c6bf to 0023085 Compare July 31, 2024 18:02
- name: Configure Deployment AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Build docs website
run: tools/scripts/build-website.sh "${{ 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.

build-website doesn't need aws credentials, why move to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on section in build-website that would download the previous versions.json and then prepend the new version info to it. I moved the aws credentials up to download the versions.json file

git checkout gh-pages

echo "Attempting to update versions.json"
aws s3 cp s3://djl-ai/documentation/nightly/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.

  1. Can we just generate this versions.json file without download it?
  2. We don't need use awscli to download it, we can use curl:
curl -O https://docs.djl.ai/versions.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, I'll look into using curl, I am unfamiliar with it

@Varun-Dutta Varun-Dutta changed the title Update docs.yml and docs workflow to support versioning [docs] update docs.yml and docs workflow to support versioning Aug 2, 2024
@Varun-Dutta Varun-Dutta marked this pull request as ready for review August 2, 2024 01:35
@Varun-Dutta Varun-Dutta requested review from zachgk and a team as code owners August 2, 2024 01:35
@tosterberg tosterberg merged commit e03f0ec into deepjavalibrary:master Aug 5, 2024
5 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