From 33d50c55ea08591dac6ac1e04d9a8b03a31bc487 Mon Sep 17 00:00:00 2001 From: maksim-karatkevich Date: Wed, 13 May 2020 17:58:21 +0300 Subject: [PATCH] create deploy demo script --- .github/workflows/demoDeploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/demoDeploy.yml diff --git a/.github/workflows/demoDeploy.yml b/.github/workflows/demoDeploy.yml new file mode 100644 index 00000000..8bf794e0 --- /dev/null +++ b/.github/workflows/demoDeploy.yml @@ -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