-
Notifications
You must be signed in to change notification settings - Fork 7
60 lines (50 loc) · 1.43 KB
/
swagger.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
55
56
57
58
59
60
name: Generate Swagger Documentation
on:
push:
branches:
- main
- master
- develop
jobs:
swagger-gh-pages:
runs-on: ubuntu-latest
container:
image: escolalms/php:8
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Instantiate package
uses: actions/checkout@v2
- name: Prepare Laravel Application
run: |
cp docker/envs/.env.ci.mysql .env
cp docker/envs/phpunit.xml.mysql phpunit.xml
- name: Update composer
run: |
apt-get install unzip -y
composer self-update
composer update
- name: Generage openapi
run: php artisan l5-swagger:generate
- name: Generate Swagger UI
uses: Legion2/swagger-ui-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
output: swagger-ui
spec-file: "./storage/api-docs/api-docs.json"
- name: Install git
run: apt-get install git -y
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: swagger-ui
cname: api-docs.wellms.io