[IDLE-248] github actions workflow 수정 #111
Workflow file for this run
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: 'book-service api specification to s3' | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'backend/book-service/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'backend/book-service/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Application Test Yaml | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: backend/book-service/src/main/resources/application-test.yml | |
env: | |
aladin.api.key : ${{ secrets.ALADIN_API_KEY }} | |
kakao.api.key : ${{ secrets.KAKAO_API_KEY }} | |
- name: Setup Bootstrap Yaml | |
uses: microsoft/variable-substitution@v1 | |
with: | |
files: backend/book-service/src/main/resources/bootstrap.yml | |
env: | |
spring.profiles.active: test | |
- name: Create Output Directory | |
working-directory: backend/book-service | |
run: | | |
mkdir -p build/resources/main/static/docs | |
echo "test" > build/resources/main/static/docs/book-service.json | |
- name: Run Openapi3 | |
working-directory: backend/book-service | |
run: | | |
./gradlew openapi3 | |
- name: Upload OpenApi Specification to S3 | |
working-directory: backend/book-service | |
run: | | |
aws s3 cp build/resources/main/static/docs/book-service.json s3://mybrary-swagger-ui/docs/book-service.json | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.OPEN_API_GIT_ACTIONS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.OPEN_API_GIT_ACTIONS_SECRET_KEY }} | |
AWS_REGION: ap-northeast-2 | |