From bfa10531b8a023986be0fc4d3c945b87bd9a3d07 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 19 Jan 2026 15:56:25 -0600 Subject: [PATCH 1/2] Add GitHub Actions workflow to deploy R documentation This workflow builds and deploys the R documentation site from the graphing-library-docs repository to this repo's GitHub Pages. The workflow: - Runs weekly (Sundays) to pick up docs changes - Can be triggered manually via workflow_dispatch - Can be triggered via repository_dispatch from the docs repo The docs source lives at cpsievert/graphing-library-docs and includes documentation for both plotly.R and ggplotly. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/docs.yml | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..326cd96cb2 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,82 @@ +# Add this file to plotly/plotly.R at .github/workflows/docs.yml +# +# This workflow builds and deploys the R documentation site from +# the graphing-library-docs repository to this repo's GitHub Pages. + +name: Deploy R Documentation + +on: + # Manual trigger + workflow_dispatch: + + # Run weekly to pick up any docs changes + schedule: + - cron: '0 0 * * 0' # Every Sunday at midnight UTC + + # Optional: trigger from docs repo via repository_dispatch + repository_dispatch: + types: [docs-updated] + +# Sets permissions for GitHub Pages deployment +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: false + +env: + # Change this if the docs repo moves to a different location + DOCS_REPO: cpsievert/graphing-library-docs + DOCS_BRANCH: master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout docs repository + uses: actions/checkout@v4 + with: + repository: ${{ env.DOCS_REPO }} + ref: ${{ env.DOCS_BRANCH }} + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7.4' + bundler-cache: true + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Fetch R/ggplot2 docs from plotly.r-docs + run: make fetch + + - name: Validate front-matter + run: python front-matter-ci.py _posts + + - name: Build site + run: bundle exec jekyll build + env: + JEKYLL_ENV: production + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: _site + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From b25624dd773815579c58498a4af72a265944b625 Mon Sep 17 00:00:00 2001 From: Carson Date: Mon, 19 Jan 2026 16:15:27 -0600 Subject: [PATCH 2/2] Try sleeping in shinytest test for relayout size stability --- inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R b/inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R index ead36064f6..7e594cfb59 100644 --- a/inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R +++ b/inst/examples/shiny/event_data/tests/testthat/test-shinytest2.R @@ -21,6 +21,7 @@ test_that("Plotly input values in Shiny", { app$set_inputs(`plotly_brushed-A` = "{\"x\":[23.95978500551268,25.98332414553473],\"y\":[3.0020072289156627,3.5073743975903615]}", allow_no_input_binding_ = TRUE) app$set_inputs(`plotly_hover-A` = "[{\"curveNumber\":0,\"pointNumber\":7,\"x\":24.4,\"y\":3.19,\"customdata\":\"Merc 240D\"}]", allow_no_input_binding_ = TRUE) app$set_inputs(`plotly_hover-A` = character(0), allow_no_input_binding_ = TRUE) + Sys.sleep(1) app$expect_values() app$set_inputs(`plotly_selected-A` = character(0), allow_no_input_binding_ = TRUE) app$set_inputs(`plotly_brushed-A` = character(0), allow_no_input_binding_ = TRUE) @@ -30,5 +31,6 @@ test_that("Plotly input values in Shiny", { app$set_inputs(`plotly_brushing-A` = character(0), allow_no_input_binding_ = TRUE) app$set_inputs(`plotly_click-A` = character(0), allow_no_input_binding_ = TRUE) app$set_inputs(`plotly_deselect-A` = "\"plot\"", allow_no_input_binding_ = TRUE) + Sys.sleep(1) app$expect_values() })