Skip to content

CI

CI #37

Workflow file for this run

name: CI
on:
push:
schedule:
- cron: 0 0 * * *
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rye
uses: eifinger/setup-rye@v3
- name: Install sing-box
run: bash <(curl -fsSL https://sing-box.app/deb-install.sh)
- name: Install Python Dependencies
run: rye sync --no-lock
- name: Build Rule Sets
run: |-
mkdir --parents --verbose rule-sets
rye run python scripts/build.py
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: rule-sets
path: rule-sets
deploy:
name: Deploy
permissions:
contents: write
needs:
- build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: rule-sets
path: rule-sets
- name: Deploy to GitHub Branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ github.token }}
publish_branch: rule-sets
publish_dir: rule-sets
force_orphan: true