add demo deploy workflow

This commit is contained in:
Maksim Karatkevich 2020-05-13 16:16:12 +03:00
parent 9eaf0bb005
commit 0788d9b1ca

23
.github/workflows/demoDeploy.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Deploy to demo
on:
repository_dispatch:
types: deploy-to-demo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Use Node.js 10.x
uses: actions/setup-node@v1
- uses: actions/checkout@v2
with:
ref: demo
- run: npm run build -- --prod --aot
- run: rsync -r dist/. "${{ secrets.ADDRESS }}":~/views/admin/ngx-demo/dist