File tree Expand file tree Collapse file tree 4 files changed +4156
-4015
lines changed
src/components/OptimadeStructureHandler Expand file tree Collapse file tree 4 files changed +4156
-4015
lines changed Original file line number Diff line number Diff line change 1+ name : Update Cached Periodic Table
2+
3+ on :
4+ schedule :
5+ - cron : " 0 3 * * 0" # every Sunday at 03:00 UTC
6+ workflow_dispatch : # allow manual triggering
7+
8+ jobs :
9+ update-cache :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repo
14+ uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0 # required for committing
17+
18+ - name : Set up Node
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : 20
22+
23+ - name : Install deps
24+ run : npm ci
25+
26+ - name : Run cache generation script
27+ run : node scripts/buildPTableCache.js
28+
29+ - name : Commit and push if changed
30+ run : |
31+ if [[ -n "$(git status --porcelain public/cachedPTable.json)" ]]; then
32+ git config --global user.name "github-actions[bot]"
33+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
34+ git add public/cachedPTable.json
35+ git commit -m "Update cached PTable ($(date -u +"%Y-%m-%d"))"
36+ git push
37+ else
38+ echo "No changes detected, nothing to commit."
39+ fi
You can’t perform that action at this time.
0 commit comments