Update dictionary #1659
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: Update dictionary | |
on: | |
workflow_dispatch: | |
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 | |
run: npm ci | |
- name: Build | |
run: | | |
npm run generate-dictionary | |
npm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CF_AUTH_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
command: pages deploy ./dist --project-name=${{ secrets.CF_PROJECT_NAME }} --branch=main | |
- name: Purge cache on Cloudflare | |
uses: jakejarvis/[email protected] | |
env: | |
CLOUDFLARE_ZONE: ${{ secrets.CF_ZONE_ID }} | |
CLOUDFLARE_TOKEN: ${{ secrets.CF_AUTH_TOKEN }} | |
PURGE_URLS: '["https://interslavic-dictionary.com/data/*"]' |