-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.34 KB
/
swaggerui.yaml
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
name: 🚀 Deploy SwaggerUI OAS 3.1
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
paths:
- api/openapi.yaml
jobs:
swaggerui:
runs-on: ubuntu-latest
permissions:
deployments: write
steps:
- name: 📝 Get latest API specification
uses: actions/checkout@v4
with:
sparse-checkout: |-
api
sparse-checkout-cone-mode: false
- name: 🚚 Move API spec to /api/dist
shell: bash
run: |-
echo "Copying API spec file to /api/dist"
cp ${{ github.workspace }}/api/openapi.yaml ${{ github.workspace }}/api/dist
- name: 🍀 Start Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
env: API - OAS 3.1.0
- name: 🌠 Deploy to Vercel
working-directory: ${{ github.workspace }}/api/dist
run: |-
npm install --global vercel
vercel --token=${{ secrets.VERCEL_TOKEN }} --prod
- name: ✅ Update Deployment Status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
status: ${{ job.status }}
env: ${{ steps.deployment.outputs.env }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}