From ef7d2b14db0346c7079886f856967b27c554b3ee Mon Sep 17 00:00:00 2001 From: marinesnow34 Date: Fri, 3 Nov 2023 21:27:01 +0900 Subject: [PATCH] =?UTF-8?q?Config:=20workflow=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main_merge.yml | 14 +++++++++++++- .github/workflows/test_merge.yml | 20 ++++++++++---------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main_merge.yml b/.github/workflows/main_merge.yml index 15f0c9c..43dfed2 100644 --- a/.github/workflows/main_merge.yml +++ b/.github/workflows/main_merge.yml @@ -1 +1,13 @@ -#추후에 메인서버 배포시에는 작성 예정 \ No newline at end of file +#추후에 메인서버 배포시에는 작성 예정 +name: Main Server Merge +on: + push: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: test #임시 + run: | + echo "test" \ No newline at end of file diff --git a/.github/workflows/test_merge.yml b/.github/workflows/test_merge.yml index 305e5b1..8af0d40 100644 --- a/.github/workflows/test_merge.yml +++ b/.github/workflows/test_merge.yml @@ -27,13 +27,13 @@ jobs: run: ./gradlew clean build - name: remove plain.jar - run: rm -rf build/libs/plain.jar + run: rm -rf build/libs/*plain.jar - name: file copy uses: actions/upload-artifact@v3 with: - name: build - path: build + name: libs + path: build/libs deploy: needs: build runs-on: ubuntu-latest @@ -41,8 +41,8 @@ jobs: - name: file download uses: actions/download-artifact@v3 with: - name: build - path: build + name: libs + path: libs - name: Upload to Cloudflare env: AWS_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }} @@ -51,16 +51,16 @@ jobs: BUCKET_NAME: ${{ secrets.CF_BUCKET_NAME }} ENDPOINT_URL: ${{ secrets.CF_ENDPOINT_URL }} run: | - aws s3 sync build/libs/ s3://$BUCKET_NAME/java/main/test \ + aws s3 sync libs/ s3://$BUCKET_NAME/java/main/test \ --endpoint-url $ENDPOINT_URL --delete --exact-timestamps - name: SSH and deploy uses: appleboy/ssh-action@v1.0.0 with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - key: ${{ secrets.SSH_KEY }} - port: ${{ secrets.PORT }} + host: ${{ secrets.TEST_HOST }} + username: ${{ secrets.TEST_USERNAME }} + key: ${{ secrets.TEST_SSH_KEY }} + port: ${{ secrets.TEST_PORT }} timeout: 40s # 30초 기본 script: | aws s3 sync s3://readyvery-dev-server/java/main/test ./docker/java/test/jar \