2020-02-02 22:07:17 +08:00
|
|
|
name: sync list to dist
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-02-03 10:45:02 +08:00
|
|
|
- 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 ./anti-ad-surge.txt ~/website/surge.txt
|
|
|
|
- name: Commit files
|
|
|
|
run: |
|
|
|
|
cd ~/website
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
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:04:36 +08:00
|
|
|
directory: '../website'
|
2020-02-03 10:51:38 +08:00
|
|
|
repository: 'privacy-protection-tools/privacy-protection-tools.github.io'
|