From c8d5d13069917feee5b0f222adf8414de5217246 Mon Sep 17 00:00:00 2001 From: Kasper Birch Date: Thu, 16 Nov 2023 17:59:45 +0100 Subject: [PATCH] Add lighthouse --- .github/workflows/lighthouse.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/lighthouse.yml diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 000000000..32c12dc15 --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,35 @@ +name: Lighthouse CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lighthouse: + runs-on: ubuntu-latest + env: + SHOPIFY_STORE_DOMAIN: ${{ secrets.SHOP_DOMAIN }} + SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ secrets.SHOP_ACCESS_TOKEN }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 18.17 + + - name: Install dependencies + run: yarn install + + - name: Build project (if necessary) + run: yarn run build + + - name: Run Lighthouse + uses: treosh/lighthouse-ci-action@v8 + with: + urls: | + https://commerce-omega-two-98.vercel.app/ + upload_artifact: true