-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (46 loc) · 1.21 KB
/
api-openapi-generate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: API OpenAPI Generate
on:
push:
branches: [dev]
paths: server/**
workflow_dispatch:
jobs:
deploy:
defaults:
run:
working-directory: server
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: yozm-cafe
MYSQL_ROOT_PASSWORD: root
ports:
- 20000:3306
steps:
- name: Use repository source
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: adopt
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate Open API Specification
run: ./gradlew openapi3
- name: Move to api directory
run: cat server/build/api-spec/openapi3.yaml > api/openapi.yaml
working-directory: ./
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./api
destination_dir: api-docs