-
Notifications
You must be signed in to change notification settings - Fork 32
49 lines (48 loc) · 1.25 KB
/
build-deploy.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
name: Lint-Prettier-Prettier:verify-Tests-CypressTests-Build-Purgecss-Deploy
on:
pull_request:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v1 #this installs node and npm for us
with:
node-version: '14.x'
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm dependencies
run: |
npm install
- name: Prettier
run: |
npm run prettier
- name: Prettier Verify
run: |
npm run prettier:verify
- name: Lint
run: |
npm run lint
# - name: Cypress Test // bug-doesn't return back to cli,
# run: |
# npm run e2e:ci
- name: Test
run: |
npm run test
- name: Build
run: |
npm run final-build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist