From 85bb1361bacf8ae084066bed463aceeb31153a4b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 2 Nov 2024 21:26:55 -0400 Subject: [PATCH 1/5] add workflow --- .../workflows/docs-preview-create-request.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docs-preview-create-request.yml diff --git a/.github/workflows/docs-preview-create-request.yml b/.github/workflows/docs-preview-create-request.yml new file mode 100644 index 00000000..712e7378 --- /dev/null +++ b/.github/workflows/docs-preview-create-request.yml @@ -0,0 +1,26 @@ +# https://github.com/sveltejs/svelte.dev/blob/main/apps/svelte.dev/scripts/sync-docs/README.md +name: Docs preview create request + +on: + pull_request: + branches: + - main + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v3 + with: + token: ${{ secrets.SYNC_REQUEST_TOKEN }} + repository: sveltejs/svelte.dev + event-type: docs-preview-create + client-payload: |- + { + "package": "cli", + "owner": ${{ github.event.pull_request.user }}, + "branch": ${{ github.ref_name }}, + "repo": ${{ github.repository }}, + "pr": ${{ github.event.pull_request.number }} + } From 144cfd8c20c39dabae5e65066dd293dbbe904262 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 2 Nov 2024 21:36:23 -0400 Subject: [PATCH 2/5] try this --- .github/workflows/docs-preview-create-request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs-preview-create-request.yml b/.github/workflows/docs-preview-create-request.yml index 712e7378..a2dab0ee 100644 --- a/.github/workflows/docs-preview-create-request.yml +++ b/.github/workflows/docs-preview-create-request.yml @@ -19,8 +19,8 @@ jobs: client-payload: |- { "package": "cli", - "owner": ${{ github.event.pull_request.user }}, - "branch": ${{ github.ref_name }}, - "repo": ${{ github.repository }}, + "repo": "${{ github.repository }}", + "owner": "${{ github.event.pull_request.head.repo.owner.login }}", + "branch": ${{ github.event.pull_request.head.ref }}, "pr": ${{ github.event.pull_request.number }} } From 3016b6b23e7456e1655beeeb1c0dddf5fd4f3863 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 2 Nov 2024 21:37:35 -0400 Subject: [PATCH 3/5] oops --- .github/workflows/docs-preview-create-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-preview-create-request.yml b/.github/workflows/docs-preview-create-request.yml index a2dab0ee..2a27756d 100644 --- a/.github/workflows/docs-preview-create-request.yml +++ b/.github/workflows/docs-preview-create-request.yml @@ -21,6 +21,6 @@ jobs: "package": "cli", "repo": "${{ github.repository }}", "owner": "${{ github.event.pull_request.head.repo.owner.login }}", - "branch": ${{ github.event.pull_request.head.ref }}, + "branch": "${{ github.event.pull_request.head.ref }}", "pr": ${{ github.event.pull_request.number }} } From d8b5ee4633ea0111da3f37da0ddb3c460d94ae8d Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 2 Nov 2024 21:39:44 -0400 Subject: [PATCH 4/5] test change --- documentation/docs/10-introduction/10-overview.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/docs/10-introduction/10-overview.md b/documentation/docs/10-introduction/10-overview.md index 9e4b2223..abcc23df 100644 --- a/documentation/docs/10-introduction/10-overview.md +++ b/documentation/docs/10-introduction/10-overview.md @@ -2,6 +2,8 @@ title: Overview --- + + The command line interface (CLI), `sv`, is a toolkit for creating and maintaining Svelte applications. ## Usage From 3ee365e0b01f84e6c5b449309e478ad15f927574 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 2 Nov 2024 21:46:48 -0400 Subject: [PATCH 5/5] another --- documentation/docs/10-introduction/10-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/10-introduction/10-overview.md b/documentation/docs/10-introduction/10-overview.md index abcc23df..1a22e0bd 100644 --- a/documentation/docs/10-introduction/10-overview.md +++ b/documentation/docs/10-introduction/10-overview.md @@ -2,7 +2,7 @@ title: Overview --- - + The command line interface (CLI), `sv`, is a toolkit for creating and maintaining Svelte applications.