forked from the-via/keyboards
-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (39 loc) · 1.18 KB
/
update_repo.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
39
40
41
42
43
44
45
name: update repo
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: |
yarn
yarn build
git clone https://${{ secrets.GIT_TOKEN }}@github.com/itarze/via-keyboards-json.git
cd via-keyboards-json
git config user.email "via-bot@westberry.com"
git config user.name "Via-Bot"
cp -r ../dist/* .
git add .
git commit -m "Update at $(date "+%Y-%m-%d %H:%M:%S")" || true
git push
cd ..
git clone ${{ secrets.REPO_URL }}
cd ${{ secrets.REPO_NAME }}
git config user.email "via-bot@westberry.com"
git config user.name "Via-Bot"
rm -rf ./definitions/*
cp -r ../via-keyboards-json/* ./definitions/
git add .
git commit -m "Update at $(date "+%Y-%m-%d %H:%M:%S")" || true
git push