Build #21445
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: 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 |