kdevops-kpd: Merge 4a29efce07727ad56d091c52a3d5bc083c5f7c50 into 2f5e… #14
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 and Deploy Dashboard | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Generate full dashboard from first commit | |
| run: | | |
| rm -rf dashboard | |
| SHA=$(git rev-list --max-parents=0 HEAD) | |
| echo "Regenerating dashboard from commit: $SHA" | |
| ./bin/gen-dashboard.py -s "$SHA" | |
| - name: Upload Pages artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dashboard | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name != 'pull_request' | |
| uses: actions/deploy-pages@v4 |