Support repro schema v1.1: assessment, exitCode, version gate #149
This file contains hidden or 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: Build Dashboard | |
| on: | |
| push: | |
| branches: [docs-dashboard] | |
| schedule: | |
| - cron: '0 */6 * * *' # Every 6 hours | |
| workflow_dispatch: | |
| concurrency: | |
| group: dashboard-deploy | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout docs-dashboard | |
| uses: actions/checkout@v4 | |
| - name: Checkout docs-data-cache | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: docs-data-cache | |
| path: .data-cache | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| # Generate dashboard data from cache | |
| - name: Generate dashboard data | |
| run: dotnet run --project src/SkiaSharp.Triage.Cli -- generate --from-cache .data-cache -o src/SkiaSharp.Triage.Dashboard/wwwroot/data | |
| # Build and deploy | |
| - name: Restore dependencies | |
| run: dotnet restore src/SkiaSharp.Triage.Dashboard/SkiaSharp.Triage.Dashboard.csproj | |
| - name: Publish | |
| run: dotnet publish src/SkiaSharp.Triage.Dashboard/SkiaSharp.Triage.Dashboard.csproj --configuration Release --output ./publish | |
| - name: Fingerprint static assets | |
| run: | | |
| # Create fingerprinted copies of CSS files and update index.html references | |
| python3 -c " | |
| import json, shutil, re, os | |
| manifest = json.load(open('./publish/SkiaSharp.Triage.Dashboard.staticwebassets.endpoints.json')) | |
| index_path = './publish/wwwroot/index.html' | |
| index = open(index_path).read() | |
| done = set() | |
| for ep in manifest['Endpoints']: | |
| route = ep['Route'] | |
| asset = ep.get('AssetFile', '') | |
| if route == asset or route in done: | |
| continue | |
| # Only fingerprint CSS (not compressed, not framework JS which is already handled) | |
| if not route.endswith('.css'): | |
| continue | |
| # Skip compressed variants — we only want the plain source file | |
| if asset.endswith('.gz') or asset.endswith('.br'): | |
| continue | |
| # Route must have a hash (fingerprinted) and asset must not | |
| if not re.search(r'\.[a-z0-9]{8,}\.', route): | |
| continue | |
| src = os.path.join('./publish/wwwroot', asset) | |
| dst = os.path.join('./publish/wwwroot', route) | |
| if os.path.exists(src) and not os.path.exists(dst): | |
| os.makedirs(os.path.dirname(dst), exist_ok=True) | |
| shutil.copy2(src, dst) | |
| if asset in index: | |
| index = index.replace(asset, route, 1) | |
| done.add(route) | |
| print(f' {asset} -> {route}') | |
| open(index_path, 'w').write(index) | |
| print('Fingerprinted', len(done), 'static assets') | |
| " | |
| - name: Set base href for GitHub Pages | |
| run: sed -i 's|<base href="/" />|<base href="/SkiaSharp/dashboard/" />|' ./publish/wwwroot/index.html | |
| - name: Add .nojekyll | |
| run: touch ./publish/wwwroot/.nojekyll | |
| - name: Deploy dashboard to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./publish/wwwroot | |
| publish_branch: docs-live | |
| destination_dir: dashboard | |
| keep_files: true | |
| commit_message: 'Deploy dashboard - ${{ github.sha }}' | |
| - name: Deploy root 404.html for SPA routing | |
| run: | | |
| mkdir -p ./root-404 | |
| cp ./src/SkiaSharp.Triage.Dashboard/wwwroot/root-404.html ./root-404/404.html | |
| - name: Deploy root 404.html | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./root-404 | |
| publish_branch: docs-live | |
| destination_dir: . | |
| keep_files: true | |
| commit_message: 'Update root 404.html for dashboard SPA routing' |