Merge pull request #1046 from jenkins-infra/automation/publish-report #10
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: 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 |