From be315a76cc3ea4d0e6d697a890452328264c5f52 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Tue, 6 Jan 2026 15:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3CICD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yaml | 53 ------------------------------------ 1 file changed, 53 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 1f2f2d9..6066e7a 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -35,59 +35,6 @@ jobs: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - # - name: Checkout Code - # uses: actions/checkout@v3 - # with: - # github-server-url: http://192.168.0.103:3000 - # repository: ${{ github.repository }} - - # # 使用 rsync 透過 2224 Port 推送代碼 - # - name: Push Code to Production - # run: | - # # 1. 快速安裝工具 - # apt-get update && apt-get install -y rsync openssh-client - - # # 2. 準備鑰匙 - # mkdir -p ~/.ssh - # echo "${{ secrets.PROD_SSH_KEY }}" > ~/.ssh/id_rsa_prod - # chmod 600 ~/.ssh/id_rsa_prod - - # # 3. 精簡後的同步指令 (只排除 .git) - # rsync -avz --delete \ - # --exclude='.git' \ - # --exclude='.env' \ - # -e "ssh -p 2224 -i ~/.ssh/id_rsa_prod -o StrictHostKeyChecking=no" \ - # ./ root@erp.koori.tw:/var/www/koori-erp-prod/ - - # rm ~/.ssh/id_rsa_prod - - - # # 遠端執行 Docker 指令 - # - name: Remote Docker Commands - # uses: appleboy/ssh-action@master - # with: - # host: erp.koori.tw - # port: 2224 # <--- 這裡指定了 2224 Port - # username: root - # key: ${{ secrets.PROD_SSH_KEY }} - # script: | - # cd /var/www/koori-erp-prod - # chown -R 1000:1000 . - - # # 2. 啟動容器 - # WWWGROUP=1000 WWWUSER=1000 docker compose up -d --build --wait - - # # 3. 執行 Laravel 正式環境優化流程 - # docker exec -u 1000:1000 -w /var/www/html koori-erp-laravel sh -c " - # composer install --no-dev --optimize-autoloader && - # npm install && - # npm run build && - # php artisan migrate --force && - # php artisan optimize:clear && - # php artisan optimize - # " - # docker exec koori-erp-laravel chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache - # docker restart koori-erp-laravel - name: Checkout Code uses: actions/checkout@v3 with: