2020-02-02 22:07:17 +08:00
|
|
|
name: sync list to dist
|
|
|
|
|
2020-02-03 11:49:35 +08:00
|
|
|
on:
|
|
|
|
push:
|
2020-02-12 10:58:24 +08:00
|
|
|
branches:
|
|
|
|
- 'master'
|
2020-02-03 11:49:35 +08:00
|
|
|
paths:
|
2021-05-29 09:05:25 +08:00
|
|
|
- 'anti-ad-**.*'
|
2020-02-03 11:49:35 +08:00
|
|
|
- 'adblock-for-dnsmasq.conf'
|
2021-05-29 09:05:25 +08:00
|
|
|
workflow_dispatch:
|
2020-02-02 22:07:17 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-02-03 10:45:02 +08:00
|
|
|
- name: clone the website
|
2020-07-21 22:53:09 +08:00
|
|
|
run: git clone https://github.com/privacy-protection-tools/anti-ad.github.io.git ~/website
|
2020-02-03 10:45:02 +08:00
|
|
|
- name: copy some list files
|
|
|
|
run: |
|
2020-07-21 22:53:09 +08:00
|
|
|
cp ./anti-ad-easylist.txt ~/website/docs/easylist.txt
|
2021-04-18 13:58:22 +08:00
|
|
|
cp ./anti-ad-easylist.txt.md5 ~/website/docs/easylist.txt.md5
|
2021-05-20 18:24:22 +08:00
|
|
|
cp ./anti-ad-adguard.txt ~/website/docs/adguard.txt
|
|
|
|
cp ./anti-ad-adguard.txt.md5 ~/website/docs/adguard.txt.md5
|
2020-07-21 22:53:09 +08:00
|
|
|
cp ./adblock-for-dnsmasq.conf ~/website/docs/dnsmasq.conf
|
|
|
|
cp ./adblock-for-dnsmasq.conf ~/website/docs/anti-ad-for-dnsmasq.conf
|
|
|
|
cp ./anti-ad-smartdns.conf ~/website/docs/anti-ad-for-smartdns.conf
|
|
|
|
cp ./anti-ad-surge.txt ~/website/docs/surge.txt
|
2020-08-22 23:56:13 +08:00
|
|
|
cp ./anti-ad-surge2.txt ~/website/docs/surge2.txt
|
2020-12-31 21:50:39 +08:00
|
|
|
cp ./anti-ad-clash.yaml ~/website/docs/clash.yaml
|
2020-07-21 22:53:09 +08:00
|
|
|
cp ./anti-ad-domains.txt ~/website/docs/domains.txt
|
2020-02-03 10:45:02 +08:00
|
|
|
- name: Commit files
|
|
|
|
run: |
|
|
|
|
cd ~/website
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
2020-02-03 13:34:59 +08:00
|
|
|
git add .
|
2020-02-03 10:45:02 +08:00
|
|
|
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'
|
2020-02-03 11:08:06 +08:00
|
|
|
directory: '/home/runner/website'
|
2020-07-21 22:53:09 +08:00
|
|
|
repository: 'privacy-protection-tools/anti-ad.github.io'
|