From 6cde76ac33ad61d6d99ed0c78aa048942643f2f4 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 10:31:59 +0100 Subject: [PATCH 1/7] Add deploy preview workflow Signed-off-by: Jack Baldry --- .github/workflows/deploy-pr-preview.yml | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy-pr-preview.yml diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml new file mode 100644 index 0000000000..a45177d3db --- /dev/null +++ b/.github/workflows/deploy-pr-preview.yml @@ -0,0 +1,30 @@ +name: Deploy pr preview + +on: + pull_request: + types: + - opened + - synchronize + - closed + paths: + - "docs/sources/k6/**" + +jobs: + deploy-pr-preview: + if: "!github.event.pull_request.head.repo.fork" + uses: grafana/writers-toolkit/.github/workflows/deploy-preview.yml@main + with: + branch: ${{ github.head_ref }} + event_number: ${{ github.event.number }} + repo: k6-docs + sha: ${{ github.event.pull_request.head.sha }} + sources: | + [ + { + "relative_prefix": "/docs/grafana-cloud/k6-docs/", + "repo": k6-docs, + "source_directory": "docs/sources/k6", + "website_directory": "content/docs/k6" + } + ] + title: ${{ github.event.pull_request.title }} From 6998c9cc48e52f7eb3b0f78306f5984c4560afc3 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 10:35:12 +0100 Subject: [PATCH 2/7] Make some quick edits for style Signed-off-by: Jack Baldry --- docs/sources/k6/next/get-started/resources.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/sources/k6/next/get-started/resources.md b/docs/sources/k6/next/get-started/resources.md index 73bbdbb749..d28c69a457 100644 --- a/docs/sources/k6/next/get-started/resources.md +++ b/docs/sources/k6/next/get-started/resources.md @@ -27,11 +27,15 @@ These resources help you write and run k6 tests in a safe environment and explor ## Test servers -If you need a place to learn k6 and test your scripts, you can use these playground/demo applications: +If you need a place to learn k6 and test your scripts, you can use these demo applications: -- [grafana/quickpizza](https://github.com/grafana/quickpizza). A simple demo web application. +- [`grafana/quickpizza`](https://github.com/grafana/quickpizza). A demo web application. -Note that these are shared testing environments - please avoid high-load tests. Alternatively, you can deploy and host them on your infrastructure and run the examples in the repository. +{{< admonition type="note" >}} +These are testing environments shared by everyone - avoid high-load tests. + +If you want to run tests with high loads, you can deploy and host them on your infrastructure and run the examples in the repository. +{{< /admonition >}} ## k6 + your favorite tool From 443af36cd018e4cee80e81a1e7b341320e1df33f Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 10:36:25 +0100 Subject: [PATCH 3/7] fixup! Add deploy preview workflow --- .github/workflows/deploy-pr-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index a45177d3db..29481fb673 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -22,7 +22,7 @@ jobs: [ { "relative_prefix": "/docs/grafana-cloud/k6-docs/", - "repo": k6-docs, + "repo": "k6-docs", "source_directory": "docs/sources/k6", "website_directory": "content/docs/k6" } From 9df79e7ed34fd58cd3080aeaf5639607b3e274ac Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 10:40:49 +0100 Subject: [PATCH 4/7] fixup! fixup! Add deploy preview workflow --- .github/workflows/deploy-pr-preview.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 29481fb673..7001b8b2c1 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -21,7 +21,7 @@ jobs: sources: | [ { - "relative_prefix": "/docs/grafana-cloud/k6-docs/", + "relative_prefix": "/docs/k6/", "repo": "k6-docs", "source_directory": "docs/sources/k6", "website_directory": "content/docs/k6" From da0a7add8b17e92d151e2ad62b5ac5b700b5c694 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 11:01:07 +0100 Subject: [PATCH 5/7] fixup! fixup! Add deploy preview workflow --- .github/workflows/deploy-pr-preview.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 7001b8b2c1..21e3bba0c0 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -24,7 +24,7 @@ jobs: "relative_prefix": "/docs/k6/", "repo": "k6-docs", "source_directory": "docs/sources/k6", - "website_directory": "content/docs/k6" - } + "source_directory": "docs/sources/k6/next", + "website_directory": "content/docs/k6/next" ] title: ${{ github.event.pull_request.title }} From 2efab16b211c500b2c0bfd2a342d9f70bb25fd1b Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 11:01:07 +0100 Subject: [PATCH 6/7] fixup! fixup! fixup! Add deploy preview workflow Signed-off-by: Jack Baldry --- .github/workflows/deploy-pr-preview.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 21e3bba0c0..8af4f47a1d 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -7,7 +7,7 @@ on: - synchronize - closed paths: - - "docs/sources/k6/**" + - "docs/sources/k6/next/**" jobs: deploy-pr-preview: @@ -21,10 +21,11 @@ jobs: sources: | [ { - "relative_prefix": "/docs/k6/", + "index_file": "content/docs/k6/_index.md", + "relative_prefix": "/docs/k6/next/", "repo": "k6-docs", - "source_directory": "docs/sources/k6", "source_directory": "docs/sources/k6/next", "website_directory": "content/docs/k6/next" + } ] title: ${{ github.event.pull_request.title }} From 3375582ebd4a6f06ef87e1790a84e26efed7a403 Mon Sep 17 00:00:00 2001 From: Jack Baldry Date: Mon, 28 Jul 2025 11:20:47 +0100 Subject: [PATCH 7/7] Try with next as latest Signed-off-by: Jack Baldry --- .github/workflows/deploy-pr-preview.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-pr-preview.yml b/.github/workflows/deploy-pr-preview.yml index 8af4f47a1d..c0f3450519 100644 --- a/.github/workflows/deploy-pr-preview.yml +++ b/.github/workflows/deploy-pr-preview.yml @@ -7,7 +7,7 @@ on: - synchronize - closed paths: - - "docs/sources/k6/next/**" + - "docs/sources/k6/**" jobs: deploy-pr-preview: @@ -21,11 +21,16 @@ jobs: sources: | [ { - "index_file": "content/docs/k6/_index.md", - "relative_prefix": "/docs/k6/next/", + "relative_prefix": "/docs/k6/", + "repo": "k6-docs", + "source_directory": "docs/sources/k6", + "website_directory": "content/docs/k6" + }, + { + "relative_prefix": "/docs/k6/latest", "repo": "k6-docs", "source_directory": "docs/sources/k6/next", - "website_directory": "content/docs/k6/next" + "website_directory": "content/docs/k6/latest" } ] title: ${{ github.event.pull_request.title }}