V2Ray Scraper #15276
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: 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 |