Take screenshots of whole website #7
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
name: CI screenshots | |
on: | |
push: | |
branches: main | |
jobs: | |
screenshots: | |
runs-on: gha-runner-x64 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: current | |
- name: [email protected] | |
run: | | |
corepack enable && corepack prepare [email protected] | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Install Playwright browsers | |
run: yarn playwright install --with-deps chromium | |
- name: Build the website | |
run: yarn docusaurus build | |
- name: Take screenshots with Playwright | |
run: yarn playwright test | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: screenshots | |
path: ./screenshots | |
retention-days: 7 |