xx #38
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: LostPixel | |
on: [push] | |
jobs: | |
gatsby-for-percy: | |
name: Lost Pixel screenshots via Gatsby build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
cache: 'npm' | |
node-version: '14' | |
- run: npm ci | |
- name: Caching Gatsby | |
id: gatsby-cache-build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
public | |
.cache | |
key: ${{ runner.os }}-gatsby-build-${{ github.run_id }} | |
restore-keys: | | |
${{ runner.os }}-gatsby-build- | |
- name: Build Gatsby app | |
run: npx gatsby build --prefix-paths | |
env: | |
GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES: true | |
CI: true | |
- name: Run Gatsby app | |
run: npx gatsby serve --host 172.17.0.1 & | |
- name: Lost Pixel | |
uses: lost-pixel/[email protected] | |
env: | |
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }} |