-
Notifications
You must be signed in to change notification settings - Fork 13
48 lines (38 loc) · 1.23 KB
/
Copy pathscrape.yml
File metadata and controls
48 lines (38 loc) · 1.23 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
name: V2Ray Scraper
on:
workflow_dispatch:
schedule:
- cron: "0,15,30,45 * * * *"
permissions:
contents: write
jobs:
scrape-and-commit:
runs-on: ubuntu-latest
steps:
- name: 📥 Check out 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 # <-- pytz هم نصب میشود
- name: 🕸️ Run scraping script
run: python scraper.py
- name: 🔧 Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: ⬆️ Commit and Push Changes
run: |
git add output_configs/ README.md #
if git diff --staged --quiet; then
echo "No changes detected. Skipping commit."
else
echo "Changes detected. Committing and pushing..."
git commit -m "docs: Update README and config files 🤖 [skip ci]"
git push
fi