Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Robdel12 committed Dec 4, 2019
0 parents commit 608b47b
Show file tree
Hide file tree
Showing 71 changed files with 17,037 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- name: Install
run: bundle install
working-directory: ./tests
- name: Build
run: bundle exec jekyll build
working-directory: ./tests
- name: Default test
uses: ./
with:
build-directory: "_site"
working-directory: ./tests
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
printWidth: 100,
singleQuote: true
};
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Perceptual Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Percy Static Sites

A GitHub action to visuall test static sites with Percy. [Full API docs for this action
can be found here](https://docs.percy.io/docs/github-actions#section-snapshot-action)

## Quick start

To use the Percy snapshot GitHub action you will need to add a new step to your
actions config using the `percy/snapshot-action` action. `snapshot-action` has one
required input: the directory where your static site is built to. You will also need
to set your `PERCY_TOKEN` in your GitHub projects settings.

Below is a sample config that tests a Jekyll static site with Percy:

``` yaml
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install
run: bundle install
- name: Build
run: bundle exec jekyll build
- name: Percy Test
uses: percy/snapshot-action@v0.1.0
with:
build-directory: "_site/"
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
```
24 changes: 24 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Percy Static Site" # Uhhhh name?
description: "A GitHub action to visually test static sites with Percy"
branding:
icon: 'camera'
color: 'purple'
inputs:
build-directory:
description: 'The directory where your static site outputs its build to'
default: ''
flags:
description: 'CLI flags to pass to `percy snapshot`'
default: ''
working-directory:
description: 'The working directory which the commands should be executed in'
default: './'
silence:
description: 'Silence logging'
default: false
verbose:
description: 'Enable verbose logging'
default: false
runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit 608b47b

Please sign in to comment.