Fix: CI를 Gitea runner 호환으로 변경 — GitHub Action 의존 제거
Some checks failed
Client CI/CD / test (push) Waiting to run
Client CI/CD / deploy (push) Has been cancelled

actions/setup-node → curl + apt-get 직접 설치
docker/login-action + build-push-action → docker CLI 직접 사용
appleboy/ssh-action → ssh 직접 실행

Gitea runner가 github.com에서 action clone 실패하는 문제 해결.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 16:40:30 +09:00
parent 4e3a01428a
commit 4232c80f2f

View File

@@ -13,10 +13,13 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4 - name: Setup Node.js
with: run: |
node-version: '22' if ! command -v node &>/dev/null || [ "$(node -v | cut -d. -f1 | tr -d v)" -lt 22 ]; then
cache: 'npm' curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
fi
node -v && npm -v
- name: Install dependencies - name: Install dependencies
run: npm ci --legacy-peer-deps run: npm ci --legacy-peer-deps
@@ -40,37 +43,28 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3 - name: Login to Gitea Registry
run: echo "${{ secrets.GITEA_TOKEN }}" | docker login git.tolelom.xyz -u "${{ github.actor }}" --password-stdin
- uses: docker/login-action@v3 - name: Build and Push Docker Image
with: run: |
registry: git.tolelom.xyz docker build \
username: ${{ github.actor }} --build-arg VITE_API_BASE_URL=https://a301.api.tolelom.xyz \
password: ${{ secrets.GITEA_TOKEN }} -t git.tolelom.xyz/${{ github.repository_owner }}/a301-web:latest \
.
- uses: docker/build-push-action@v5 docker push git.tolelom.xyz/${{ github.repository_owner }}/a301-web:latest
with:
context: .
push: true
tags: git.tolelom.xyz/${{ github.repository_owner }}/a301-web:latest
platforms: linux/arm64
build-args: |
VITE_API_BASE_URL=https://a301.api.tolelom.xyz
cache-from: type=gha
cache-to: type=gha,mode=max
# ── 3. 서버 배포 ────────────────────────────────────────────────────────── # ── 3. 서버 배포 ──────────────────────────────────────────────────────────
deploy: deploy:
needs: docker needs: docker
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: appleboy/ssh-action@v1 - name: Deploy to Server
with: run: |
host: ${{ secrets.SERVER_HOST }} mkdir -p ~/.ssh
username: ${{ secrets.SERVER_USER }} echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
key: ${{ secrets.SSH_PRIVATE_KEY }} chmod 600 ~/.ssh/deploy_key
script: | ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key \
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} \
cd ~/server 'export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin && cd ~/server && docker compose pull web && docker compose up -d web'
docker compose pull web rm -f ~/.ssh/deploy_key
docker compose up -d web