Skip to content

Merge pull request #963 from jenkins-infra/automation/publish-report #7

Merge pull request #963 from jenkins-infra/automation/publish-report

Merge pull request #963 from jenkins-infra/automation/publish-report #7

name: Deploy single Consolidated JSON Report to GitHub Pages
on:
push:
branches: [main]
paths:
- '_plugin-modernizer-stats-report/report.json'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create index.html redirect
run: |
cat > _plugin-modernizer-stats-report/index.html << 'HEREDOC'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./report.json">
<title>Redirecting to report.json</title>
</head>
<body>
<p>Redirecting to <a href="./report.json">report.json</a>…</p>
</body>
</html>
HEREDOC
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _plugin-modernizer-stats-report/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4