-
Notifications
You must be signed in to change notification settings - Fork 2
64 lines (49 loc) · 1.44 KB
/
ci.yml
File metadata and controls
64 lines (49 loc) · 1.44 KB
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
name: Node.js CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2.3.1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Lint
run: npx eslint --ext .js,.jsx .
- name: Run unit tests
run: npx jest --ci --coverage --detectOpenHandles
- name: Bulid for test
run: |
npm run build:dev
cp dist/index.html dist/404.html
# - name: Run E2E tests
# run: npm run test:ci-e2e
- name: Bulid
run: |
npm run build
cp -r static dist/
cp favicon.ico dist/
cp dist/index.html dist/404.html
cp .gitignore dist/.gitignore
env:
API_KEY: ${{ secrets.API_KEY }}
AUTH_DOMAIN: ${{ secrets.AUTH_DOMAIN }}
PROJECT_ID: ${{ secrets.PROJECT_ID }}
STORAGE_BUCKET: ${{ secrets.STORAGE_BUCKET }}
MESSAGING_SENDER_ID: ${{ secrets.MESSAGING_SENDER_ID }}
APP_ID: ${{ secrets.APP_ID }}
MEASUREMENT_ID: ${{ secrets.MEASUREMENT_ID }}
- name: Deploy
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: dist
cname: space-obit.com