Website Status/Metrics #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 22.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 |