Hourly Course Import #5448
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: Hourly Course Import | |
| on: | |
| push: | |
| branches: | |
| - wf | |
| schedule: | |
| # Run every hour | |
| - cron: '0 * * * *' | |
| workflow_dispatch: # Allows manual triggering of the workflow | |
| jobs: | |
| import-courses: | |
| runs-on: ubuntu-latest | |
| #if: github.ref == 'refs/heads/main' # Only run on main branch | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' # Specify your Python version if needed | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # If you have a requirements file, uncomment the next line | |
| pip install -r scripts/import_docs/requirements.txt | |
| - name: Run import script | |
| env: | |
| AISYSTANT_BASE_URL: ${{ vars.AISYSTANT_BASE_URL }} | |
| AISYSTANT_SESSION_TOKEN: ${{ secrets.AISYSTANT_SESSION_TOKEN }} | |
| run: bash scripts/import_docs/run.sh |