forked from SivanMehta/letterboxed
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1005 Bytes
/
standard-puzzles.yaml
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
39
40
41
name: Update Standard Puzzles
on:
# Runs on a schedule to update the puzzle daily
schedule:
# 3:30 am PST is 11:30 am UTC
- cron: '30 11 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent run
concurrency:
group: update
cancel-in-progress: true
jobs:
update:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update puzzles
run: |
npm ci
npm run scrape
- name: Push to repo
run: |
# If there are differences:
if ! git diff --exit-code >/dev/null; then
git config --global user.name "Letterboxed CI"
git config --global user.email "[email protected]"
git add public/puzzle-sources/standard
git commit -a -m "Add puzzle from $(date +%Y-%m-%d)"
git push
fi