Deploy test #119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |