put demo project in separate nx project directory #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: '16' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/checkout@master | |
- name: 'Install dependency' | |
run: npm ci | |
- name: 'Build the library' | |
run: npm run ci:build:library | |
- name: 'Build the demo app' | |
run: npm run ci:build:app | |
- name: 'Test the library' | |
run: npm run ci:test:library | |
- name: 'Test the demo app' | |
run: npm run ci: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 }} |