From 23c181a3165b4b04ec5d517df61cc4f9c6b884b5 Mon Sep 17 00:00:00 2001 From: Jonas Bulik Date: Thu, 4 Jul 2024 10:59:39 +0200 Subject: [PATCH] ci(tools): #21 run lost pixel github action --- .github/workflows/vrt.yml | 29 +++++++++++++++++++++++++++++ lostpixel.config.ts | 10 ++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/vrt.yml create mode 100644 lostpixel.config.ts diff --git a/.github/workflows/vrt.yml b/.github/workflows/vrt.yml new file mode 100644 index 00000000..2f216700 --- /dev/null +++ b/.github/workflows/vrt.yml @@ -0,0 +1,29 @@ +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + name: Lost Pixel + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Install dependencies + run: pnpm install + + - name: Build app + run: pnpm run build + + - name: Start server (in background) + run: pnpm run preview & + + - name: Lost Pixel + uses: lost-pixel/lost-pixel@v3.16.0 + env: + LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }} diff --git a/lostpixel.config.ts b/lostpixel.config.ts new file mode 100644 index 00000000..0fb9d01d --- /dev/null +++ b/lostpixel.config.ts @@ -0,0 +1,10 @@ +import type { CustomProjectConfig } from 'lost-pixel'; + +export const config: CustomProjectConfig = { + pageShots: { + pages: [{ path: '/', name: 'landing' }], + baseUrl: 'http://172.17.0.1:3000', + }, + lostPixelProjectId: 'clrkf72110ugom40el0d2rkx9', + apiKey: process.env.LOST_PIXEL_API_KEY, +};