-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (40 loc) · 1.43 KB
/
node.js.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build-Test-Deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Build 🌍 and Test 🐞
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm install codecov
- run: npm test -- --coverage
- run: npx codecov --disable=gcov
- run: rm -rf package.json package-lock.json
- run: mv example-package.json package.json
- run: npm install
- run: npm install --save @babel/preset-typescript
- run: npm run build
- run: npm run build:demo:ci
env:
PUBLIC_URL: '/context-api-dev-tools-extension/'
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch