Skip to content

Commit 1379726

Browse files
authored
Merge pull request #2 from adamziel/test-change-2
Echo "hello world"
2 parents 333da79 + 51d8a0d commit 1379726

File tree

2 files changed

+50
-4
lines changed

2 files changed

+50
-4
lines changed

.github/workflows/pr-playground-preview.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,43 @@ on:
99
- edited
1010

1111
jobs:
12+
create-blueprint:
13+
name: Create Blueprint
14+
runs-on: ubuntu-latest
15+
outputs:
16+
blueprint: ${{ steps.blueprint.outputs.result }}
17+
steps:
18+
- name: Create Blueprint
19+
id: blueprint
20+
uses: actions/github-script@v7
21+
with:
22+
script: |
23+
const blueprint = {
24+
steps: [
25+
{
26+
step: "installPlugin",
27+
pluginData: {
28+
resource: "git:directory",
29+
url: `https://github.com/${context.repo.owner}/${context.repo.repo}.git`,
30+
ref: context.payload.pull_request.head.ref,
31+
path: "/"
32+
}
33+
}
34+
]
35+
};
36+
return JSON.stringify(blueprint);
37+
result-encoding: string
38+
1239
playground-preview:
1340
name: Update Playground Preview
41+
needs: create-blueprint
1442
permissions:
1543
contents: read
1644
pull-requests: write
1745
issues: write
18-
uses: Automattic/preview-button/.github/workflows/playground-preview.yml@main
46+
uses: adamziel/playground-preview/.github/workflows/playground-preview.yml@trunk
1947
with:
20-
preview-mode: comment
21-
plugin-path: .
48+
mode: "append-to-description"
49+
# plugin-path: .
50+
blueprint: ${{ needs.create-blueprint.outputs.blueprint }}
51+

plugin.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,21 @@
77
*/
88

99
add_action( 'init', function() {
10-
// Simple initialization logic can go here.
1110
} );
11+
12+
add_action( 'wp_head', function() {
13+
echo '<script>console.log("hello world");</script>';
14+
} );
15+
/**/
16+
/**/
17+
/**/
18+
/**/
19+
/**/
20+
/**/
21+
/**/
22+
/**/
23+
/**/
24+
/**/
25+
/**/
26+
/**/
27+
/**/

0 commit comments

Comments
 (0)