[BE] 커스텀 예외 리팩터링 #9
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: backend deploy dev api docs | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- closed | |
branches: ["develop"] | |
paths: | |
- "backend/src/docs/**" | |
- "backend/src/test/**/docs/**" | |
permissions: | |
contents: read | |
jobs: | |
build-and-upload: | |
if: ${{ github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' }} | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: backend | |
steps: | |
- name: Set up Repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "corretto" | |
- name: Give permission for Gradle | |
run: chmod +x gradlew | |
- name: Cache Gradle | |
id: cache-gradle | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Upload docs html file artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DocsHtml | |
path: backend/src/main/resources/static/docs/index.html | |
deploy: | |
needs: build-and-upload | |
runs-on: self-hosted | |
steps: | |
- name: Download docs html file from artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: DocsHtml | |
path: backend/dev/docs/ | |
- name: Move docs file to deploy | |
working-directory: backend/dev/ | |
run: | | |
mv docs/index.html /home/ubuntu/team-by-team/docs/ | |
chmod g+r /home/ubuntu/team-by-team/docs/index.html |