Skip to content

Merge pull request #956 from seancdavis/bot/notion-post-publisher-170… #370

Merge pull request #956 from seancdavis/bot/notion-post-publisher-170…

Merge pull request #956 from seancdavis/bot/notion-post-publisher-170… #370

name: Update Visual Regression Snapshots
on:
push:
branches:
- main
paths:
- www/**
jobs:
Update-Visual-Regression-Snapshots:
name: "Update Visual Regression Snapshots"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: actions/cache@v2
id: yarn-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Build site
run: |
cd www
npm run pretest:visual
env:
IMGIX_DOMAIN: ${{ secrets.IMGIX_DOMAIN }}
IMGIX_TOKEN: ${{ secrets.IMGIX_TOKEN }}
- name: Run tests
# Note: Shouldn't need env vars because the site is already built and we
# won't have any failures. We're committing to the repo directly.
run: |
cd www
JEST_CONFIG=visual ELEVENTY_ENV=test ./node_modules/.bin/jest --updateSnapshot
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[Bot] Update jest snapshots"
commit_user_name: Sean C Davis
commit_user_email: scdavis41@gmail.com
commit_author: Sean C Davis <scdavis41@gmail.com>
branch: ${{ github.head_ref }}