Skip to content

fix: 자동 줄 늘림으로 변경 (#90) #37

fix: 자동 줄 늘림으로 변경 (#90)

fix: 자동 줄 늘림으로 변경 (#90) #37

Workflow file for this run

name: deploy frontend server
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository and set up
uses: actions/checkout@v4
- name: setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: generate env file
run: |
touch .env
echo VITE_API_URL="${{ secrets.VITE_API_URL }}" >> .env
echo VITE_AWS_LAMBDA_URL="${{ secrets.VITE_AWS_LAMBDA_URL }}" >> .env
echo VITE_AWS_CLOUDFRONT_URL="${{ secrets.VITE_AWS_CLOUDFRONT_URL }}" >> .env
cat .env
- name: build before install pnpm
run: pnpm install
- name: build process
run: pnpm run build
- name: compress build files
run: tar -cvf build.tar dist
- name: copy file via ssh key (scp)
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
source: 'build.tar'
target: /home/ubuntu/
- name: run deploy script via scp
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
pwd
ls -al
bash front-deploy.sh