mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-04-28 07:51:20 +00:00
feat: SEO reports Workflow using unlighthouse
This commit is contained in:
parent
81b8ebe807
commit
f513fbe44a
2 changed files with 31 additions and 34 deletions
31
.github/workflows/seo-report.yaml
vendored
Normal file
31
.github/workflows/seo-report.yaml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: Unlighthouse SEO Reports
|
||||||
|
|
||||||
|
on:
|
||||||
|
[deployment_status]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
e2e:
|
||||||
|
if: github.event.deployment_status.state == 'success'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out Git repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: yarn global add @unlighthouse/cli puppeteer
|
||||||
|
|
||||||
|
- name: Build Unlighthouse report
|
||||||
|
run: unlighthouse-ci --site ${{ github.event.deployment_status.target_url }} --build-static
|
||||||
|
|
||||||
|
- name: Deploy report to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: './.unlighthouse'
|
||||||
|
publish_branch: gh-pages
|
||||||
|
publish_dir_prefix: ${{ github.head_ref }}
|
34
.github/workflows/seo.yaml
vendored
34
.github/workflows/seo.yaml
vendored
|
@ -1,34 +0,0 @@
|
||||||
name: Assertions and static report
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
demo:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: npm add @unlighthouse/cli puppeteer
|
|
||||||
|
|
||||||
- name: Unlighthouse assertions and client
|
|
||||||
run: unlighthouse-ci --site <your-site> --build-static
|
|
||||||
|
|
||||||
- name: Deploy report to Netlify
|
|
||||||
uses: nwtgck/actions-netlify@v1.2
|
|
||||||
with:
|
|
||||||
publish-dir: './.unlighthouse'
|
|
||||||
production-branch: main
|
|
||||||
production-deploy: true
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
deploy-message: "New Release Deploy from GitHub Actions"
|
|
||||||
enable-pull-request-comment: false
|
|
||||||
enable-commit-comment: true
|
|
||||||
overwrites-pull-request-comment: true
|
|
||||||
env:
|
|
||||||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
||||||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_DEMO_SITE_ID }}
|
|
||||||
timeout-minutes: 1
|
|
Loading…
Reference in a new issue