-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (34 loc) · 1.05 KB
/
update-dictionary.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
uses: bahmutov/npm-install@v1
- name: Build
run: |
npm run lint
npm run test
npm run generateDictionary
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/*"]'