Move Lighthouse testing to deploy job

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-01-31 21:55:37 +05:30
parent 5713a6e7e9
commit 4998d86277
2 changed files with 11 additions and 23 deletions

View File

@ -1,4 +1,4 @@
name: Hugo deployment
name: Hugo deployment and Lighthouse testing
on:
push:
@ -44,6 +44,16 @@ jobs:
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION_PROD }}
SSH_PORT: ${{ secrets.SSH_PORT }}
- name: Audit URL using Lighthouse
uses: docker://jakejarvis/lighthouse-action:latest
with:
url: 'https://msfjarvis.dev/'
- name: Upload results as an artifact
uses: actions/upload-artifact@master
with:
name: report
path: './report'
# - name: Purge Cloudflare cache
# run: |
# curl -s -X POST "https://api.cloudflare.com/client/v4/zones/${CF_ZONE_ID}/purge_cache" -H "X-Auth-Email: msfjarvis@gmail.com" -H "X-Auth-Key: ${CF_API_KEY}" -H "Content-Type: application/json" --data '{"purge_everything":true}'

View File

@ -1,22 +0,0 @@
name: Lighthouse testing
on:
push:
branches:
- src
jobs:
lighthouse-test:
runs-on: ubuntu-18.04
steps:
- name: Wait for deployment to finish
run: sleep 10
- name: Audit URL using Lighthouse
uses: docker://jakejarvis/lighthouse-action:latest
with:
url: 'https://msfjarvis.dev/'
- name: Upload results as an artifact
uses: actions/upload-artifact@master
with:
name: report
path: './report'