-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (53 loc) · 2.18 KB
/
deploy_dashboard.yml
File metadata and controls
62 lines (53 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy ITK Dashboard
on:
schedule:
- cron: '0 4 * * *' # Run daily at 4:00 AM UTC (2 hours after SDK nightly runs)
workflow_dispatch: # Allow manual trigger to refresh metrics instantly
push:
branches:
- main
paths:
- 'dashboard/**'
- '.github/workflows/deploy_dashboard.yml'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs in progress for safety
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}dashboard/
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Fetch live nightly compatibility metrics
run: |
echo "Syncing latest interop logs from SDK rolling releases..."
# Download Python Metrics directly into the dashboard directory
curl -L -f -o dashboard/itk_python.json https://github.com/a2aproject/a2a-python/releases/download/nightly-metrics/itk_python.json || echo "{}" > dashboard/itk_python.json
# Download Go Metrics directly into the dashboard directory
curl -L -f -o dashboard/itk_go.json https://github.com/a2aproject/a2a-go/releases/download/nightly-metrics/itk_go.json || echo "{}" > dashboard/itk_go.json
echo "Metrics synchronized successfully!"
- name: Prepare static site structure
run: |
# Create a clean temporary distribution directory serving only the dashboard folder
mkdir -p deploy_dist/dashboard
cp -r dashboard/* deploy_dist/dashboard/
echo "Site structure prepared under deploy_dist/"
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Upload static site artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload the temporary distribution directory to prevent exposing unwanted repo files
path: 'deploy_dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4