-
Notifications
You must be signed in to change notification settings - Fork 227
37 lines (35 loc) · 991 Bytes
/
build.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
name: Build
on:
push:
branches:
- main
schedule:
- cron: "0 */2 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.EXCALIBOT_PAT_WORKFLOWS }}
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: yarn
- name: Building stats
env:
ANALYTICS_PRIVATE_KEY: ${{ secrets.ANALYTICS_PRIVATE_KEY }}
ANALYTICS_PRIVATE_KEY_ID: ${{ secrets.ANALYTICS_PRIVATE_KEY_ID }}
run: yarn build
- name: Commit changes
run: |
FILE_CHANGED=$(git diff stats.json)
if [ ! -z "${FILE_CHANGED}" ]; then
git config --global user.name 'Excalidraw Bot'
git config --global user.email 'bot@excalidraw.com'
git add .
git commit -am "Auto commit: New data"
git push
fi