-
Notifications
You must be signed in to change notification settings - Fork 36
42 lines (32 loc) · 1.2 KB
/
on-merge.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
name: 'CI-CD'
on:
push:
branches:
- 'master'
jobs:
build-test-deploy:
name: Build, test, and deploy the demo only
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@master
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@master
- name: 'Install dependency'
run: npm ci
- name: 'Build'
run: npm run build
- name: 'Test the library'
run: npm run test:lib
- name: 'Test the demo app'
run: npm run test:app
- name: 'Ship the coverage within the demo website'
run: cp -r ./coverage ./dist/ngx-image-compress-demo/coverage
- name: 'Publish to Netlify'
uses: netlify/actions/cli@master
with:
args: deploy --dir=./dist/ngx-image-compress-demo --message "${{ github.event.head_commit.message }}" --prod --open
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}