Merge branch 'lncrawl:dev' into dev #3
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: Generate source index | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - dev | |
| paths: | |
| - "sources/**" | |
| - "!sources/_index.json" | |
| - "!sources/_index.zip" | |
| - "scripts/index_gen.py" | |
| - "scripts/check_sources.py" | |
| - "lncrawl/VERSION" | |
| - ".github/workflows/index-gen.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| index_gen: | |
| if: github.repository == 'lncrawl/lightnovel-crawler' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🐍 Set Up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: 📦 Install Dependencies | |
| run: uv sync --frozen | |
| - name: ⚙️ Generate Index | |
| run: uv run python ./scripts/index_gen.py | |
| - name: ✅ Commit and Push Index | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: Generate source index | |
| - name: 📤 Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: sources/_index.zip | |
| name: index.zip |