-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (69 loc) · 2.16 KB
/
deploy-to-gh-pages.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Build and Deploy
on:
push:
branches:
- staging
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install 🔧
run: |
sudo npm install -g @vue/cli
sudo npm install -g codecov
sudo npm install -g wait-on
npm ci
- name: Run Cypress 🚀
uses: cypress-io/github-action@v2
with:
browser: chrome
start: npm run serve
wait-on: 'http://localhost:8080'
record: true
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate CodeCov Code Coverage Report 🔧
run: |
ls -la
sudo codecov --disable=gcov
- name: Run CodeCov 🚀
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
- name: Run Code Climate 🚀
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run coverage
debug: true
- name: Run SonarCloud 🚀
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Build 🔧
run: |
npm run build
- name: Copy index.html And Rename To 404.html Into dist folder 🔧
run: |
sudo ls -la
cd dist
cp index.html 404.html
sudo ls -la
cd ..
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: staging
BRANCH: master
FOLDER: dist