Covered in this doc
Integrating Percy with GitHub actions
Percy CLI required
These docs are for Percy CLI. If you're currently using an older SDK that uses
@percy/agent, you will need to use one of our deprecated GitHub Actions
Keep your Percy token secret
Anyone with access to your token can add builds to your project, though they cannot read data.
Start by adding the
PERCY_TOKEN to your repos secrets.
PERCY_TOKEN is your project-specific, write-only API token. It can be found in your Percy project settings and add it to your GitHub project secrets.
In your GitHub project's settings, go to Settings > Secrets
PERCY_TOKEN to the write-only token from your Percy project. This token can be found in each Percy project's settings.
Now you can run your tests with Percy (typically
percy exec -- [test command] or
percy snapshot [dir|file|sitemap]) and send builds to Percy from CI.
name: CI build: runs-on: ubuntu-latest - uses: actions/[email protected] # Build - name: Percy Test run: npx @percy/cli snapshot _site/ # or any directory such as public/
Updated 8 months ago