Fix: Gitea 워크플로우에서 GitHub Action 의존 제거
All checks were successful
Client CI/CD / test (push) Successful in 9s
Client CI/CD / deploy (push) Successful in 15s

.gitea/workflows/deploy.yml이 실제 실행되는 파일.
actions/checkout, actions/setup-node, appleboy/ssh-action을
모두 직접 실행 방식으로 대체.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 16:58:47 +09:00
parent 35dbdbba3b
commit a5af22478a

View File

@@ -10,13 +10,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 코드 체크아웃 - name: 코드 체크아웃
uses: actions/checkout@v4 run: |
git config --global --add safe.directory /workspace/A301/a301_client
git init
git remote add origin $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git
git fetch --depth=1 origin $GITHUB_SHA
git checkout $GITHUB_SHA
- name: Node.js 설정 - name: Node.js 설정
uses: actions/setup-node@v4 run: |
with: if ! command -v node &>/dev/null || [ "$(node -v | cut -d. -f1 | tr -d v)" -lt 22 ]; then
node-version: '22' curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
cache: 'npm' apt-get install -y nodejs
fi
node -v && npm -v
- name: 의존성 설치 - name: 의존성 설치
run: npm ci --legacy-peer-deps run: npm ci --legacy-peer-deps
@@ -35,23 +42,11 @@ jobs:
needs: test needs: test
steps: steps:
- name: 서버에 배포 - name: 서버에 배포
uses: appleboy/ssh-action@v1 run: |
with: mkdir -p ~/.ssh
host: ${{ secrets.SERVER_HOST }} echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
username: ${{ secrets.SERVER_USER }} chmod 600 ~/.ssh/deploy_key
key: ${{ secrets.SSH_PRIVATE_KEY }} ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key \
port: 22 ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} \
script: | 'set -e && export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin && cd /tmp && rm -rf a301-client && git clone --quiet 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'
set -e rm -f ~/.ssh/deploy_key
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin
cd /tmp
rm -rf a301-client
# Suppress token from logs
set +x
git clone --quiet https://tolelom:${{ secrets.GIT_TOKEN }}@git.tolelom.xyz/A301/a301_client.git a301-client 2>/dev/null
set -x
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