Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Analyze Site Performance and Generate SVG #3

Analyze Site Performance and Generate SVG

Analyze Site Performance and Generate SVG #3

Workflow file for this run

name: PSI-SVG Action
on:
workflow_run:
workflows: ["Webhook Triggered Workflow"]
types:
- completed
workflow_dispatch:
jobs:
run-psi-svg:
runs-on: ubuntu-latest
env:
SITE_URL: ${{ vars.SITE_URL }}
PSI_SVG_OUTPUT_PATH: ${{ vars.PSI_SVG_OUTPUT_DIR }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 21
- name: Run PSI-SVG
run: |
mkdir -p $PSI_SVG_OUTPUT_DIR
npx psi-svg $SITE_URL $PSI_SVG_OUTPUT_DIR/psi-desktop.svg --strategy=desktop
npx psi-svg $SITE_URL $PSI_SVG_OUTPUT_DIR/psi-mobile.svg --strategy=mobile
- name: Upload output SVGs as artifacts
uses: actions/upload-artifact@v4
with:
name: psi-svg
path: ${{ vars.PSI_SVG_OUTPUT_DIR }}