Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.
/ yarn-percy-ci Public archive

GitHub Action >> Build with Yarn, Snapshot with Percy

License

Notifications You must be signed in to change notification settings

jpvalery/yarn-percy-ci

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yarn & Percy CI

Build with Yarn, Snapshot with Percy

GitHub Action to build your project with Yarn followed by Percy snapshots.

Requirements

You'll need to set up a secret PERCY_TOKEN.

Read more about secrets with GitHub and Percy Token.

How to use

Just add this to .github/workflows/main.yml

name: CI

on:
  pull_request:
    branches:
    - master

jobs:
  CI_Workflow:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Yarn & Percy CI
      uses: jpvalery/yarn-percy-ci@master
      env:
        PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

Don't want to use this action?

You could just copy/paste this code instead.

name: CI

on:
  pull_request:
    branches:
    - master

jobs:
  CI_Workflow:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Yarn Install
      run: yarn install
    - name: Yarn Build
      run: yarn build
    - name: Percy
      run: yarn percy snapshot ./public
      env:
        PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

Thanks

Thanks to Wil from Percy.io for all his help in troubleshooting this action.