Skip to content

Merge pull request #278 from elmadev/dev #35

Merge pull request #278 from elmadev/dev

Merge pull request #278 from elmadev/dev #35

name: Build and Deploy live
on:
push:
branches:
- master
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: 22
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build project
run: yarn build
env:
VITE_API_URL: ${{ secrets.API_URL_LIVE }}
VITE_S3_SUB_FOLDER: ${{ secrets.S3_SUB_FOLDER_LIVE }}
VITE_UP_URL: ${{ secrets.UP_LIVE }}
VITE_RECAPTCHA: ${{ secrets.RECAPTCHA_LIVE }}
VITE_HOTJAR_ID: ${{ secrets.HOTJAR }}
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST_LIVE }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: 'build/*'
target: '${{ secrets.SSH_BUILD_PATH }}'
strip_components: 1