chore(ci): deploy docs

This commit is contained in:
katebatura 2021-12-01 18:17:12 +03:00
parent 82ce37f9f9
commit 0bc48e7ad0
2 changed files with 34 additions and 1 deletions

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

@ -0,0 +1,31 @@
name: Deploy to demo
on:
push:
branches:
- 'demo'
paths:
- 'src/**'
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@v2
with:
node-version: '12'
- uses: actions/checkout@v2
with:
ref: demo
- run: npm install
- run: npm run build:demo:prod
- run: rsync -r --delete-after dist/. "${{ secrets.REMOTE_URL }}":"${{ secrets.ADDRESS }}"

View file

@ -15,7 +15,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Use Node.js 12.x
uses: actions/setup-node@v1
uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/checkout@v2
with:
ref: demo