Update trusted stack stats #9
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: Update trusted stack stats | |
| on: | |
| schedule: | |
| # Weekly: Monday 06:00 UTC | |
| - cron: '0 6 * * 1' | |
| workflow_dispatch: | |
| permissions: {} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| update: | |
| if: github.repository == 'voidzero-dev/vite-plus' && github.event.repository.fork == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version-file: .node-version | |
| - name: Fetch npm and GitHub stats | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node docs/.vitepress/theme/data/fetch-trusted-stack-stats.ts | |
| - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| id: app-token | |
| with: | |
| client-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Create or update PR | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| base: main | |
| branch: chore/docs-trusted-stack-stats | |
| title: 'chore(docs): refresh trusted stack stats' | |
| sign-commits: true | |
| token: ${{ steps.app-token.outputs.token }} | |
| commit-message: 'chore(docs): refresh trusted stack stats' | |
| add-paths: | | |
| docs/.vitepress/theme/data/trusted-stack-stats.json | |
| body: | | |
| Automated update of trusted stack statistics on the docs homepage. | |
| - npm weekly downloads (last-week): vite, vitest, oxlint | |
| - GitHub stars: vitejs/vite, vitest-dev/vitest, oxc-project/oxc |