Skip to content

Commit

Permalink
Config: workflow 오류 수정2
Browse files Browse the repository at this point in the history
  • Loading branch information
marinesnow34 committed Nov 3, 2023
1 parent aede9d9 commit ef7d2b1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/main_merge.yml
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
#추후에 메인서버 배포시에는 작성 예정
#추후에 메인서버 배포시에는 작성 예정
name: Main Server Merge
on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: test #임시
run: |
echo "test"
20 changes: 10 additions & 10 deletions .github/workflows/test_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ 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
steps:
- 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 }}
Expand All @@ -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/[email protected]
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 \
Expand Down

0 comments on commit ef7d2b1

Please sign in to comment.