Skip to content

Commit

Permalink
Merge pull request #206 from readyvery/test
Browse files Browse the repository at this point in the history
Fix: action s3 업로드 통한 CI/CD 수정
  • Loading branch information
marinesnow34 authored Mar 20, 2024
2 parents 7c5d948 + 605fc5d commit 0f6c15a
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/main_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,31 @@ jobs:
# with:
# name: libs
# path: build/libs
- name: file upload
uses: appleboy/[email protected]
with:
username: ${{ secrets.MAIN_USERNAME }}
host: ${{ secrets.MAIN_HOST }}
key: ${{ secrets.MAIN_SSH_KEY }}
source: "build/libs/*.jar"
target: "/home/ready/docker/readyvery/jar"
- name: Upload to Cloudflare
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
BUCKET_NAME: ${{ secrets.CF_BUCKET_NAME }}
ENDPOINT_URL: ${{ secrets.CF_ENDPOINT_URL }}
run: |
aws s3 sync build/libs/ s3://$BUCKET_NAME/java/main/ready \
--endpoint-url $ENDPOINT_URL --delete --exact-timestamps
- name: SSH and deploy
uses: appleboy/[email protected]
with:
host: ${{ secrets.MAIN_HOST }}
username: ${{ secrets.MAIN_USERNAME }}
key: ${{ secrets.MAIN_SSH_KEY }}
port: ${{ secrets.TEST_PORT }}

timeout: 40s # 30초 기본
script: |
aws s3 sync s3://readyvery-dev-server/java/main/ready ./docker/readyvery/jar \
--endpoint-url https://29c6e4b55b1ddb8d2b6e69df21141caa.r2.cloudflarestorage.com \
--delete --exact-timestamps
docker-compose build readyvery
docker-compose up -d readyvery

0 comments on commit 0f6c15a

Please sign in to comment.