mirror of
https://github.com/privacy-protection-tools/anti-AD.git
synced 2025-01-22 22:39:16 +08:00
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: sync list to dist
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "16 13 */6 * *"
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- 'anti-ad-*.txt'
|
|
- 'anti-ad-*.conf'
|
|
- 'adblock-for-dnsmasq.conf'
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: clone the website
|
|
run: git clone https://github.com/privacy-protection-tools/privacy-protection-tools.github.io.git ~/website
|
|
- name: copy some list files
|
|
run: |
|
|
cp ./anti-ad-easylist.txt ~/website/easylist.txt
|
|
cp ./adblock-for-dnsmasq.conf ~/website/dnsmasq.conf
|
|
cp ./adblock-for-dnsmasq.conf ~/website/anti-ad-for-dnsmasq.conf
|
|
cp ./anti-ad-smartdns.conf ~/website/anti-ad-for-smartdns.conf
|
|
cp ./anti-ad-surge.txt ~/website/surge.txt
|
|
cp ./anti-ad-domains.txt ~/website/domains.txt
|
|
- name: Commit files
|
|
run: |
|
|
cd ~/website
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add .
|
|
git commit -m "pull newest list." -a
|
|
- name: Push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.PERSON_TOKEN }}
|
|
branch: 'master'
|
|
directory: '/home/runner/website'
|
|
repository: 'privacy-protection-tools/privacy-protection-tools.github.io'
|