Novel Auto-Updater #992
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: Novel Auto-Updater | |
| on: | |
| schedule: | |
| # Run every 30 minutes. | |
| # Note: GitHub Actions schedule can sometimes be delayed by a few minutes during peak times, but it is 100% free. | |
| - cron: '*/60 * * * *' | |
| # Allow manual trigger from the GitHub Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| run-updater: | |
| runs-on: ubuntu-latest | |
| # Prevents multiple updaters from running at the exact same time | |
| concurrency: | |
| group: novel-updater | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Auto-Updater | |
| env: | |
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
| SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | |
| run: | | |
| # Use the --once flag to run a single cycle instead of the infinite loop | |
| python novel_updater.py --once |