Skip to content

deploy CI-CD 테스트 #3

deploy CI-CD 테스트

deploy CI-CD 테스트 #3

Workflow file for this run

name: Upload Swagger
on:
pull_request:
branches:
- deploy
types:
- closed
paths:
- "lottery/**"
- "order/**"
- "common/**"
jobs:
test:
runs-on: ubuntu-latest
steps:
# 스니펫을 불러온다.
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
aws-region: 'ap-northeast-2'
- name: Download files from S3
run: |
aws s3 cp s3://watermelon-s3-bucket/snippets/ ./merged-api-spec --recursive
- name: Verify files downloaded
run: |
echo "Download Files"
ls -la ./merged-api-spec
- name: Generate Swagger Document
run: |
./gradlew openapi3
./gradlew customGenerateSwaggerUI
ls
# 스웨거를 업로드한다.
- name: Upload to S3
uses: jakejarvis/s3-sync-action@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
AWS_REGION: 'ap-northeast-2' # 리전 정보
SOURCE_DIR: 'swagger-ui-watermelon' # 업로드할 파일들이 위치한 로컬 디렉토리
AWS_S3_BUCKET: 'watermelon-s3-bucket' # S3 버킷 이름