Scan Trending GitHub Repos #154
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: Scan Trending GitHub Repos | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 1 * * *' | |
| permissions: | |
| contents: write | |
| issues: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run Trending Scanner | |
| run: python scripts/scan_trending.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| - name: Commit updated data | |
| run: | | |
| git add _data/trending_checked.yml | |
| git commit -m "Update trending checked list" || echo "No changes" | |
| git push | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| uses: actions/deploy-pages@v4 |