Skip to content

Deploy openapi.json to https://api.movary.org #8

Deploy openapi.json to https://api.movary.org

Deploy openapi.json to https://api.movary.org #8

Workflow file for this run

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