Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/deploy-swagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Swagger 배포

on:
push:
branches:
- develop

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_TOKEN }}
submodules: true

- name: JDK 17 설치
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

- name: Gradle 명령 실행 권한 부여
run: chmod +x ./gradlew

- name: Gradle 종속성 캐싱
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Gradle build
run: ./gradlew build

- name: Swagger UI 생성
uses: Legion2/swagger-ui-action@v1
with:
output: swagger-ui
spec-file: build/api-spec/openapi3.yaml

- name: Cloudflare Pages에 배포
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy swagger-ui --project-name="signal-buddy-api-docs"
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: JDK 17 설치
uses: actions/setup-java@v4
with:
distribution: 'oracle'
distribution: 'temurin'
java-version: '17'
cache: 'gradle'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

paths-ignore:
- 'README.md'
- '.github/workflows/deploy-swagger.yaml'
- '.github/workflows/docker-build-develop.yaml'

jobs:
test:
Expand Down