demoDeploy.yml 663 字节
Newer Older
M
maksim-karatkevich 已提交
1 2 3 4

name: Deploy to demo

on:
5 6 7 8 9
  push:
    branches:
      - 'demo'
    paths:
      - 'src/**'
M
maksim-karatkevich 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
  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
28
      - run: npm run build:demo:prod
M
maksim-karatkevich 已提交
29
      - run: rsync -r --delete-after dist/. "${{ secrets.REMOTE_URL }}":"${{ secrets.ADDRESS }}"