forked from hyle-team/block_explorer
-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (30 loc) · 1013 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run 'build prod' --if-present
# - run: npm test
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{secrets.SSH_KEY}}
known_hosts: ${{secrets.KNOWN_HOSTS}}
if_key_exists: ignore
- name: Copy Artifact
run: rsync -avz ./dist ${{secrets.SSH_USER}}@${{secrets.SSH_HOST}}:/home/${{secrets.SSH_USER}}/block_explorer/dist/