edit llm prompt #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: AI CD | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| environment: ${{ github.ref_name == 'main' && 'production' || 'development' }} | |
| steps: | |
| # 1. 소스코드 체크아웃 | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| # 2. 소스코드를 서버로 전송 | |
| - name: Transfer Source to Server | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| port: ${{ secrets.PORT }} | |
| source: "src,app.py,requirements.txt,README.md,data,scripts,test_all_task.py" | |
| target: "/home/${{ secrets.USERNAME }}/ai/temp" | |
| strip_components: 0 | |
| rm: true | |
| # 3. 배포 스크립트 전송 | |
| - name: Transfer Startup Script | |
| uses: appleboy/scp-action@master | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| port: ${{ secrets.PORT }} | |
| source: "ai-startup.sh" | |
| target: "/home/${{ secrets.USERNAME }}/ai/" | |
| strip_components: 0 | |
| # 4. 배포 실행 | |
| - name: Deploy Application | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.HOST }} | |
| username: ${{ secrets.USERNAME }} | |
| key: ${{ secrets.KEY }} | |
| port: ${{ secrets.PORT }} | |
| command_timeout: 10m | |
| request_pty: false | |
| script: | | |
| chmod +x /home/${{ secrets.USERNAME }}/ai/ai-startup.sh | |
| bash /home/${{ secrets.USERNAME }}/ai/ai-startup.sh | |
| # 5. 배포 결과 알림 | |
| - name: Notify Deployment Result | |
| if: always() | |
| uses: sarisia/actions-status-discord@v1 | |
| with: | |
| webhook: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| title: "AI ${{ github.ref_name == 'main' && '운영' || '개발' }} 서버 배포 ${{ job.status == 'success' && '성공 ✅' || '실패 ❌' }}" | |
| description: | | |
| **결과:** ${{ job.status }} | |
| **브랜치:** ${{ github.ref_name }} | |
| **작성자:** ${{ github.actor }} | |
| **커밋:** ${{ github.sha }} | |
| **서버 환경:** ${{ github.ref_name == 'main' && '운영' || '개발' }} 서버 | |
| color: ${{ job.status == 'success' && '0x00ff00' || '0xff0000' }} |