Skip to content

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/scp-action@v0.1.4
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/ssh-action@v0.1.10
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