-
Notifications
You must be signed in to change notification settings - Fork 16
34 lines (30 loc) · 1001 Bytes
/
deploy-openapi.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
name: Deploy openapi.json to https://api.movary.org
on:
release:
types: [published]
paths:
- docs/openapi.json
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: copy files
uses: appleboy/[email protected]
with:
host: ${{ secrets.DOCS_SSH_HOST }}
username: ${{ secrets.DOCS_SSH_USER }}
key: ${{ secrets.DOCS_SSH_KEY }}
source: "docs/openapi.json"
target: ${{ secrets.API_DEPLOYMENT_DIRECTORY }}
strip_components: 1
- uses: actions/checkout@v3
- name: update openapi application version
uses: appleboy/[email protected]
with:
host: ${{ secrets.DOCS_SSH_HOST }}
username: ${{ secrets.DOCS_SSH_USER }}
key: ${{ secrets.DOCS_SSH_KEY }}
script: >
sed -i 's/"version": ""/"version": "${{ github.ref_name }}"/g' ${{ secrets.API_DEPLOYMENT_DIRECTORY }}/openapi.json