Skip to content

Update dictionary #1618

Update dictionary

Update dictionary #1618

name: Update dictionary
on:
schedule:
- cron: '0 0 * * *'
jobs:
update-dictionary:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
ref: master
- name: NPM install
uses: bahmutov/npm-install@v1
- name: Generate dictionary
run: |
npm run generateDictionary
- name: Deploy dictionary
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./static
cname: interslavic-dictionary.com
keep_files: true
allow_empty_commit: true
- name: Purge cache on Cloudflare
uses: jakejarvis/cloudflare-purge-action@v0.3.0
env:
CLOUDFLARE_ZONE: ${{ secrets.CF_ZONE_ID }}
CLOUDFLARE_TOKEN: ${{ secrets.CF_AUTH_TOKEN }}
PURGE_URLS: '["https://interslavic-dictionary.com/data/*"]'