-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (39 loc) · 997 Bytes
/
deploy-test.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
35
36
37
38
39
40
41
42
43
44
name: Deploy test
on:
push:
branches:
- master
- dev
workflow_dispatch:
jobs:
deploy-test:
runs-on: ubuntu-latest
environment: dev
env:
YARN_ENABLE_SCRIPTS: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: "yarn"
- name: Install deps and build
run: |
yarn install --immutable | grep -v 'YN0013'
yarn build
- name: Deploy to test environment
uses: appleboy/scp-action@master
with:
username: ubuntu
host: ${{ secrets.HOST }}
port: 22
key: ${{ secrets.KEY }}
source: ${{ github.workspace }}/packages/app/build
target: "/home/ubuntu/cred"
strip_components: 5
rm: true