Update Blogs #1357
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 Blogs | |
| on: | |
| issues: | |
| types: [opened] | |
| schedule: | |
| - cron: "0 0 * * *" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: | | |
| startsWith(github.event.issue.title, 'blog|') | |
| || github.event_name == 'schedule' | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.10" | |
| - uses: actions/cache@v3 | |
| name: Configure pip caching | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install -r blog/requirements.txt | |
| - name: Running Main File | |
| env: | |
| REPO: ${{github.repository}} | |
| ISSUE_NUMBER: ${{github.event.issue.number}} | |
| TOKEN: ${{github.token}} | |
| TYPE: ${{github.event_name}} | |
| run: python blog/updateBlog.py |