gradlew 실행권한 부여하도록 수정 테스트 #4
This file contains 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: 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 | |
# Gradle wrapper 파일 실행 권한주기 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- 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 버킷 이름 |