Publish Bus Factor Data #97
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: Publish Bus Factor Data | |
| on: | |
| schedule: | |
| - cron: '29 2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| permissions: {} | |
| container: | |
| image: perldocker/perl-tester:5.42 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: cpm install -g --cpanfile cpanfile | |
| - name: Generate bus factor data | |
| run: perl bin/bus-factor.pl > bus_factor.json | |
| - name: Prepare Pages directory | |
| run: | | |
| mkdir -p .pages | |
| gzip -k bus_factor.json | |
| cp bus_factor.json .pages/ | |
| cp bus_factor.json.gz .pages/ | |
| - name: Convert README to index.html | |
| uses: davorg/readme-to-index@v1 | |
| with: | |
| output: .pages/index.html | |
| - name: Upload artifact for Pages | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: .pages/ | |
| deploy: | |
| needs: generate | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |