create deploy demo script

This commit is contained in:
maksim-karatkevich 2020-05-13 17:58:21 +03:00 committed by GitHub
parent 9eaf0bb005
commit 33d50c55ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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

@ -0,0 +1,24 @@
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 12.x
uses: actions/setup-node@v1
- uses: actions/checkout@v2
with:
ref: demo
- run: npm install
- run: npm run build:prod
- run: rsync -r dist/. "${{ secrets.ADDRESS }}":~/views/admin/ngx-demo/dist