Skip to content

Commit 2160342

Browse files
authored
create gh actions
1 parent 90da6d5 commit 2160342

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build Project
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Use node 12
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12.x
20+
21+
- name: Get yarn cache
22+
id: yarn-cache
23+
run: echo "::set-output name=dir::$(yarn cache dir)"
24+
25+
- name: Cache Node.js modules
26+
uses: actions/cache@v1
27+
with:
28+
path: ${{ steps.yarn-cache.outputs.dir }}
29+
key: ${{ runner.OS }}-yarn-${{ hashFiles('**/yarn.lock') }}
30+
restore-keys: |
31+
${{ runner.OS }}-yarn-
32+
33+
- name: Install dependencies
34+
run: yarn
35+
36+
- name: Build project
37+
run: yarn build
38+
39+
# - name: Commit files report
40+
# run: |
41+
# git config --local user.email "[email protected]"
42+
# git config --local user.name "GitHub Action"
43+
# git add -A
44+
# git commit -m "New generated report"
45+
#
46+
# - name: GitHub Push
47+
# uses: ad-m/[email protected]
48+
# with:
49+
# github_token: ${{ secrets.GIT_TOKEN }}
50+
# directory: ./reports
51+

0 commit comments

Comments
 (0)