-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
383 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* eslint-disable no-console */ | ||
const JSDOM = require('jsdom').JSDOM | ||
|
||
const [html] = process.argv.slice(2) | ||
const { document } = new JSDOM(html).window | ||
|
||
const linkElement = document.querySelector('a') | ||
console.log(linkElement?.href ? linkElement.href.replace(/[/]$/, '') : '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Cloudflare Pages Deployed | ||
|
||
on: | ||
check_run: | ||
types: [completed] | ||
|
||
jobs: | ||
build: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
# if: github.event.check_run.pull_requests.length != 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
cache: 'yarn' | ||
- run: echo ${{ github.event.check_run.pull_requests.length }} | ||
- run: echo ${{ github.event.check_run.pull_requests.length != 0 }} | ||
- run: echo ${{ github.event.check_run.pull_requests.length != '0' }} | ||
- run: echo ${{ github.event.check_run.pull_requests }} | ||
- run: echo ${{ github.event.check_run.pull_requests[0] }} | ||
|
||
- name: Set testing state | ||
uses: thollander/actions-comment-pull-request@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
pr_number: 47 | ||
comment_includes: 'Playwright tests' | ||
message: | | ||
## 'Playwright tests' | ||
testing... | ||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Check object | ||
run: | | ||
cat << OBJECT | ||
${{ toJson(github) }} | ||
OBJECT | ||
- name: Get Cloudflare Page URL | ||
run: echo "DEPLOYMENT_URL=$(node ${GITHUB_WORKSPACE}/.github/get-cloudflare-page-url.js "${{ github.event.check_run.output.summary }}")" | ||
continue-on-error: true | ||
- run: echo $DEPLOYMENT_URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.