Safulo dictionary hyperlinks #957
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: Safulo dictionary hyperlinks | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1000 | |
- name: list modified files | |
id: listfiles | |
working-directory: ./safulo-daily | |
run: | | |
git diff --name-only $(<last)..HEAD | tee filelist | |
test -s filelist && echo "::set-output name=has_newfiles::true" | |
- name: generate stem-words.json | |
if: steps.listfiles.outputs.has_newfiles == 'true' | |
working-directory: ./safulo-daily | |
run: | | |
python reprocess-moedict-safulo.py last | |
- name: commit generated files | |
if: steps.listfiles.outputs.has_newfiles == 'true' | |
run: | | |
git config user.email [email protected] | |
git config user.name miaoski-bot | |
git commit -m 'bot generated hyperlinks' ./docs/s/ | |
git rev-parse HEAD > safulo-daily/last | |
git commit -m 'bot generated hyperlinks' ./safulo-daily/last | |
git push |