feat: update DDG filter template #180
This file contains 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: Generate dist by GitHub Actions | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'data/**' | |
- 'src/generate.py' | |
- '.github/workflows/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Clear dist | |
# in case of a malicious commit/pull request that modify manually ./dist/ | |
run: rm -rf ./dist | |
- name: Generate dist | |
run: python ./src/generate.py | |
- name: commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -A | |
if git commit -m "data: Generate dist by GitHub Actions"; then | |
git push | |
fi |