forked from lncrawl/lightnovel-crawler
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.37 KB
/
index-gen.yml
File metadata and controls
59 lines (49 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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