File tree Expand file tree Collapse file tree 4 files changed +381
-6
lines changed Expand file tree Collapse file tree 4 files changed +381
-6
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-console */
2
+ const JSDOM = require ( 'jsdom' ) . JSDOM
3
+
4
+ const [ html ] = process . argv . slice ( 2 )
5
+ const { document } = new JSDOM ( html ) . window
6
+
7
+ const linkElement = document . querySelector ( 'a' )
8
+ console . log ( linkElement ?. href ? linkElement . href . replace ( / [ / ] $ / , '' ) : '' )
Original file line number Diff line number Diff line change
1
+ name : Cloudflare Pages Deployed
2
+
3
+ on :
4
+ check_run :
5
+ types : [completed]
6
+
7
+ jobs :
8
+ build :
9
+ name : Test
10
+ runs-on : ubuntu-latest
11
+ if : github.event.check_run.pull_requests[0]
12
+
13
+ steps :
14
+ - uses : actions/checkout@v3
15
+ - uses : actions/setup-node@v3
16
+ with :
17
+ node-version : ' 16.x'
18
+ cache : ' yarn'
19
+ - run : echo ${{ github.event.check_run.pull_requests }}
20
+ - run : echo ${{ github.event.check_run.pull_requests[0] }}
21
+ - run : echo ${{ github.event.check_run.pull_requests[0] == 'Object' }}
22
+
23
+ - name : Set testing state
24
+ uses : thollander/actions-comment-pull-request@v1
25
+ with :
26
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27
+ pr_number : 47
28
+ comment_includes : ' Playwright tests'
29
+ message : |
30
+ ## 'Playwright tests'
31
+ testing...
32
+
33
+ - name : Install dependencies
34
+ run : yarn install
35
+
36
+ - name : Check object
37
+ run : |
38
+ cat << OBJECT
39
+ ${{ toJson(github) }}
40
+ OBJECT
41
+ - name : Get Cloudflare Page URL
42
+ run : echo "DEPLOYMENT_URL=$(node ${GITHUB_WORKSPACE}/.github/get-cloudflare-page-url.js "${{ github.event.check_run.output.summary }}")"
43
+ continue-on-error : true
44
+ - run : echo $DEPLOYMENT_URL
Original file line number Diff line number Diff line change 39
39
"vuepress" : " ^1.2.0"
40
40
},
41
41
"dependencies" : {
42
+ "jsdom" : " ^20.0.0" ,
42
43
"vuepress-theme-sidstraw-blog" : " file:./.vuepress/theme" ,
43
44
"yaml" : " ^1.10.0"
44
45
}
You can’t perform that action at this time.
0 commit comments