Skip to content

Deploy Test Dashboard #128

Deploy Test Dashboard

Deploy Test Dashboard #128

Workflow file for this run

name: Deploy Test Dashboard
on:
workflow_dispatch:
# Run daily to keep dashboard fresh even without test runs
schedule:
- cron: '0 6 * * *'
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Generate Dashboard
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: dashboard/package-lock.json
- name: Install dependencies
working-directory: dashboard
run: npm ci
- name: Generate dashboard
working-directory: dashboard
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
- name: Prepare deployment directory
run: |
mkdir -p _site/dashboard
cp dashboard/dist/index.html _site/dashboard/
cp dashboard/.nojekyll _site/
# Create a simple redirect at root to dashboard
cat > _site/index.html << 'EOF'
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=dashboard/">
<title>Redirecting...</title>
</head>
<body>
<p>Redirecting to <a href="dashboard/">dashboard</a>...</p>
</body>
</html>
EOF
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: _site
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4