Some checks failed
Client CI/CD / deploy (push) Failing after 10s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
906 B
YAML
30 lines
906 B
YAML
name: Client CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 서버에 배포
|
|
uses: appleboy/ssh-action@v1
|
|
with:
|
|
host: ${{ secrets.SERVER_HOST }}
|
|
username: ${{ secrets.SERVER_USER }}
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
port: 22
|
|
script: |
|
|
set -e
|
|
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin
|
|
cd /tmp
|
|
rm -rf a301-client
|
|
git clone https://tolelom:${{ secrets.GIT_TOKEN }}@git.tolelom.xyz/A301/a301_client.git a301-client
|
|
cd a301-client
|
|
docker build --no-cache --build-arg VITE_API_BASE_URL=${{ secrets.VITE_API_BASE_URL }} -t a301-client:latest .
|
|
cd ~/server
|
|
docker compose up -d --force-recreate a301-client
|
|
rm -rf /tmp/a301-client
|