-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (55 loc) · 1.56 KB
/
build.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
46
47
48
49
50
51
52
53
54
55
56
57
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
if: "!contains(github.event.head_commit.message, 'Release vue-konami@')"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: '16.14.2'
registry-url: 'https://registry.npmjs.org'
- name: Cache
uses: actions/cache@v2
env:
cache-name: cache-vue-konami-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Lint
run: npm run lint
- name: Fix Coverage Paths
working-directory: ./coverage
run: |
sed -i 's/\/home\/runner\/work\/vue-konami\/vue-konami\//\/github\/workspace\//g' lcov.info
- name: Sonar
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
publish_dir: ./.docs
cname: vue-konami.cadgerfeast.dev