Skip to content

Merge pull request #16 from ref-finance/update-v3-ui #24

Merge pull request #16 from ref-finance/update-v3-ui

Merge pull request #16 from ref-finance/update-v3-ui #24

Workflow file for this run

name: deploy-aws-us
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/upload-artifact@v3
with:
name: mydist
path: './*'
deploy-aws-us:
needs: build
runs-on: ubuntu-latest
steps:
- name: download artifact
uses: actions/download-artifact@v3
with:
name: mydist
path: mydist
- name: deploy to remote server [52.54.49.247]
uses: easingthemes/ssh-deploy@v2.2.11
with:
# 服务器私钥
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_PROD_01 }}
# Server IP
REMOTE_HOST: 52.54.49.247
# Username
REMOTE_USER: root
# Port
REMOTE_PORT: 60022
# Source Path
SOURCE: "mydist/"
# Target Path
TARGET: "/data/web/landing-page"
# rsync
ARGS: "-rltgoDzvO"
# An array of folder to exclude
EXCLUDE: ".git, .github"
- name: Execute SSH commmands on remote server[52.54.49.247]
uses: appleboy/ssh-action@master
with:
host: 52.54.49.247
username: root
key: ${{ secrets.SSH_PRIVATE_KEY_PROD_01 }}
port: 60022
script: |
cd /data/web/landing-page
chown -R root:root /data/web/landing-page
yarn install
npm run build-prod
- name: deploy to remote server [34.224.251.142]
uses: easingthemes/ssh-deploy@v2.2.11
with:
# Private Key
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_PROD_02 }}
# Server IP
REMOTE_HOST: 34.224.251.142
# Useranme
REMOTE_USER: root
# Port
REMOTE_PORT: 60022
# Source Path
SOURCE: "mydist/"
# Target Path
TARGET: "/data/web/landing-page"
# rsync
ARGS: "-rltgoDzvO"
# An array of folder to exclude
EXCLUDE: ".git, .github"
- name: Execute SSH commmands on remote server[34.224.251.142]
uses: appleboy/ssh-action@master
with:
host: 34.224.251.142
username: root
key: ${{ secrets.SSH_PRIVATE_KEY_PROD_02 }}
port: 60022
script: |
cd /data/web/landing-page
chown -R root:root /data/web/landing-page
yarn install
npm run build-prod