Skip to content

Website Status/Metrics #25

Website Status/Metrics

Website Status/Metrics #25

name: Website Status/Metrics
on:
workflow_dispatch:
schedule:
# The `*` is a special character in YAML ➔ use quotes
- cron: '0 3 * * 1,5'
jobs:
website-metrics:
name: Website Metrics
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ github.repository }} @ ${{ github.ref }}
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
fetch-depth: 1
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install NPM Packages
run: npm install
- name: Process Websites
run: npx --yes vitest run --config=web/scripts/website-metrics.vitest.ts
- name: Upload Metrics (JSON)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
retention-days: 30
name: website-metrics.json
path: web/scripts/cache/website-metrics.json
- name: Upload Metrics (HTML)
uses: actions/upload-artifact@v4
if: success() || failure()
with:
retention-days: 30
name: website-metrics.html
path: web/scripts/cache/website-metrics.html