Migrate docs build to GitHub Actions by LiamConnors · Pull Request #5541 · plotly/plotly.py

@LiamConnors

Description of change

Updates docs build to use GitHub Actions instead of CircleCI. Needs following PR in graphing-library-docs to be merged also plotly/graphing-library-docs#426

Testing strategy

Tested manually by comparing output of builds for CircleCI vs GitHub Actions

Guidelines

LiamConnors

@LiamConnors

LiamConnors

@LiamConnors

@LiamConnors

emilykl

name: doc-html
path: doc/build/html/

- name: Create GitHub App token

Choose a reason for hiding this comment

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

@LiamConnors Curious why we need to create a new token as part of the workflow — is it because the token is very short-lived?

Choose a reason for hiding this comment

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

I think it has something to do with the fact that this workflow is using a GitHub App rather than an access token.

Choose a reason for hiding this comment

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

yes, that's it. we are using a GitHub App with short-lived tokens

emilykl

camdecoster

Choose a reason for hiding this comment

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

Everything seems to be running/passing fine in the action. I'll wait to provide a final review until after you respond to questions.

name: doc-html
path: doc/build/html/

- name: Create GitHub App token

Choose a reason for hiding this comment

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

I think it has something to do with the fact that this workflow is using a GitHub App rather than an access token.

python check-or-enforce-order.py build/html

- name: Upload HTML docs artifact
uses: actions/upload-artifact@v4

Choose a reason for hiding this comment

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

You should use v6 if that doesn't break anything. v4 has been deprecated.

Choose a reason for hiding this comment

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

Looks like there's a v7. Updated it. Thanks

Comment on lines +38 to +42

- name: List installed packages
run: |
cd doc
source .venv/bin/activate
uv pip list

Choose a reason for hiding this comment

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

Is this step needed? The install step should include the version info.

Choose a reason for hiding this comment

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

Good point. Removed.

@LiamConnors

@LiamConnors

emilykl

scikit-image==0.20.0
scikit-learn
scipy==1.9.1
setuptools<=81

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Maybe because package tools was removed in v82?

Choose a reason for hiding this comment

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

camdecoster

emilykl

Choose a reason for hiding this comment

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