From 3873153b62695d5ae8d259f8007fe4fa50d70e05 Mon Sep 17 00:00:00 2001 From: sarthakkundra Date: Tue, 17 Nov 2020 01:16:56 +0530 Subject: [PATCH] added lighthouse CI removed wait for Netlify action corrected Netlify deploy urls corrected sitename corrected sitename --- .github/workflows/lighthouseCI.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/lighthouseCI.yml diff --git a/.github/workflows/lighthouseCI.yml b/.github/workflows/lighthouseCI.yml new file mode 100644 index 000000000000..d827e1b4af57 --- /dev/null +++ b/.github/workflows/lighthouseCI.yml @@ -0,0 +1,31 @@ +name: Lighthouse CI +on: pull_request +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + - name: Install and Build + run: | + yarn install + yarn build + - name: Wait for the Netlify Preview + uses: jakepartusch/wait-for-netlify-action@v1 + id: netlify + with: + site_name: 'docusaurus-2' + - name: Audit URLs using Lighthouse + uses: treosh/lighthouse-ci-action@v3 + with: + urls: | + https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/classic/ + https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/bootstrap/ + https://deploy-preview-$PR_NUMBER--docusaurus-2.netlify.app/blog-only/ + uploadArtifacts: true + env: + PR_NUMBER: ${{ github.event.pull_request.number}} \ No newline at end of file