Skip to content

Add workflow for uploading dev builds of Plotly.js #7795

Open
emilykl wants to merge 7 commits into
masterfrom
persistent-dev-build-url-2
Open

Add workflow for uploading dev builds of Plotly.js #7795
emilykl wants to merge 7 commits into
masterfrom
persistent-dev-build-url-2

Conversation

@emilykl
Copy link
Copy Markdown
Contributor

@emilykl emilykl commented May 5, 2026

Closes #7759

  • Add new upload-dev-build.yml workflow which uploads a development build of plotly.js every time a new commit is pushed to a PR
  • Builds are uploaded to a private repo and made available via GitHub Pages at the following URLs:
    • https://plotly.github.io/plotly.js-dev-builds/upload/pr-{PR_NUM}/latest/plotly.min.js (for the latest commit on a PR)
    • https://plotly.github.io/plotly.js-dev-builds/upload/pr-{PR_NUM}/{SHA}/plotly.min.js (for a specific commit SHA on a PR)
    • */plotly.js and */plot-schema.json also work
  • Also split publish-dist jobs into a separate publish-dist.yml workflow, so that the upload-dev-build workflow can be triggered as soon as publish-dist finishes, without waiting for all the tests to complete

Steps for testing

  • Note: The workflow_run trigger always runs the version of the workflow on the default branch. This is an important security feature, but it means workflow_run won't allow us to test this implementation
  • Instead, manually trigger this workflow using the "Run workflow" button on this page
    • Select Branch: persistent-dev-build-url-2 (this branch)
    • Enter PR number 7795 (this PR) and Run ID 25766159639 (a completed run of the publish-dist workflow for this PR)
  • Wait for the run to complete. After it finishes, on the run page you should see an output containing the links. Here's an example from a previous run. It will take about 2-3 minutes for the GitHub Pages deployment to finish before the links become functional.
Screenshot 2026-05-05 at 2 46 36 PM

@emilykl emilykl requested a review from camdecoster May 5, 2026 18:47
@emilykl
Copy link
Copy Markdown
Contributor Author

emilykl commented May 5, 2026

@camdecoster FYI there are no major changes to the contents of the publish-dist workflow steps.

@@ -1,17 +1,117 @@
name: Upload dev build from PR (placeholder, not yet implemented)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: Upload dev build from PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because of the (silly) way GHA woks, changing this title will break the link between this workflow file and the version on master. I'll update the title immediately before merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

have not forgotten about this, I will update before merging

Comment thread .github/workflows/publish-dist.yml
Comment thread .github/workflows/upload-dev-build.yml
Comment thread .github/workflows/upload-dev-build.yml Outdated
Comment thread .github/workflows/upload-dev-build.yml Outdated
Comment thread .github/workflows/publish-dist.yml Outdated
Comment thread .github/workflows/publish-dist.yml Outdated
Comment thread .github/workflows/publish-dist.yml Outdated
Comment thread .github/workflows/upload-dev-build.yml Outdated
Comment thread .github/workflows/publish-dist.yml Outdated
@emilykl
Copy link
Copy Markdown
Contributor Author

emilykl commented May 12, 2026

@camdecoster Following up on one of our previous discussions, GitHub Pages has a total size limit of 1 GB.

That works out to about ~50 separate dev builds (1000 MB / 20 MB = 50). A little lower than I was hoping, but if that turns out not to be enough, we can decrease the retention time and/or save only the latest build for each PR rather than individual copies per commit.

I suppose another option is to retain only plotly.min.js and ditch plotly.js and plot-schema.json.

@emilykl emilykl requested a review from camdecoster May 12, 2026 22:58
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.

[BUG]: Create long lived direct links to PR versions of library

2 participants