From 8835d0047e11692b7b2e14e4ea79aba01c9191ee Mon Sep 17 00:00:00 2001 From: Firq Date: Thu, 21 Dec 2023 00:55:41 +0100 Subject: [PATCH] added seperate unlighthouse option --- .forgejo/workflows/build_preview.yml | 2 +- .forgejo/workflows/unlighthouse.yml | 24 ++++++++++++++++++++++++ unlighthouse.config.ts | 3 +++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/unlighthouse.yml diff --git a/.forgejo/workflows/build_preview.yml b/.forgejo/workflows/build_preview.yml index 11beefa..e201be3 100644 --- a/.forgejo/workflows/build_preview.yml +++ b/.forgejo/workflows/build_preview.yml @@ -60,7 +60,7 @@ jobs: - name: Install Dependencies run: npm install @unlighthouse/cli puppeteer - name: Run unlighthouse - run: node_modules/.bin/unlighthouse-ci --site website:8081 + run: node_modules/.bin/unlighthouse-ci - name: Upload reports uses: actions/upload-artifact@v3 with: diff --git a/.forgejo/workflows/unlighthouse.yml b/.forgejo/workflows/unlighthouse.yml new file mode 100644 index 0000000..b02a736 --- /dev/null +++ b/.forgejo/workflows/unlighthouse.yml @@ -0,0 +1,24 @@ +on: + push: + tags: + - '[0-9]+\.[0-9]+\.[0-9]+unlighthouse[0-9]+' + +jobs: + unlighthouse: + needs: [publish] + if: success() + runs-on: docker + container: registry.gitlab.com/gitlab-ci-utils/lighthouse:latest + services: + website: + image: forgejo.neshweb.net/firq/firq-dev-website:preview + steps: + - name: Install Dependencies + run: npm install @unlighthouse/cli puppeteer + - name: Run unlighthouse + run: node_modules/.bin/unlighthouse-ci + - name: Upload reports + uses: actions/upload-artifact@v3 + with: + name: unlighthouse-reports + path: unlighthouse-reports/ \ No newline at end of file diff --git a/unlighthouse.config.ts b/unlighthouse.config.ts index d289ab5..a84333e 100644 --- a/unlighthouse.config.ts +++ b/unlighthouse.config.ts @@ -6,5 +6,8 @@ export default { budget: 90, buildStatic: true }, + server: { + hostname: 'website:8081' + }, outputPath: "unlighthouse-reports", }