Skip to content

Commit cd3b524

Browse files
committed
deploy(playwright): test the deployed pages, not Cloudflare's caches
The `git-scm.com` domain is handled by Cloudflare, which caches the pages. Those cached pages are not what we want to test with Playwright, so let's override via `/etc/hosts` which IP the domain name `git-scm.com` resolves to; It is currently hardcoded to the first IPv4 address listed in https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain Signed-off-by: Johannes Schindelin <[email protected]>
1 parent af845f8 commit cd3b524

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: .github/actions/deploy-to-github-pages/action.yml

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ runs:
148148
- name: Install @playwright/test
149149
shell: bash
150150
run: npm install @playwright/test
151+
- name: Edit /etc/hosts to map git-scm.com to GitHub
152+
shell: bash
153+
# This side-steps the Cloudflare caches
154+
run: sudo sh -c 'echo "185.199.108.153 git-scm.com" >>/etc/hosts'
151155
- name: Run Playwright tests
152156
shell: bash
153157
env:

0 commit comments

Comments
 (0)