Skip to content

chore(other): github action for building and deploying on test server #1

chore(other): github action for building and deploying on test server

chore(other): github action for building and deploying on test server #1

Workflow file for this run

name: Build and Deploy test
on:
push:
branches:
- github-actions
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build project
run: yarn build
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "build/*"
target: "${{ secrets.SSH_BUILD_PATH }}"