mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 16:26:37 +03:00
36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
name: Publish swagger spec
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
php-version: ['8.1']
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Determine version
|
|
id: determine_version
|
|
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
- uses: './.github/actions/ci-setup'
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
php-extensions: openswoole-4.12.1
|
|
extensions-cache-key: publish-swagger-spec-extensions-${{ matrix.php-version }}
|
|
- run: composer swagger:inline
|
|
- run: mkdir ${{ steps.determine_version.outputs.version }}
|
|
- run: mv docs/swagger/swagger-inlined.json ${{ steps.determine_version.outputs.version }}/open-api-spec.json
|
|
- name: Publish spec
|
|
uses: JamesIves/github-pages-deploy-action@4.1.7
|
|
with:
|
|
token: ${{ secrets.OAS_PUBLISH_TOKEN }}
|
|
repository-name: 'shlinkio/shlink-open-api-specs'
|
|
branch: main
|
|
folder: ${{ steps.determine_version.outputs.version }}
|
|
target-folder: specs/${{ steps.determine_version.outputs.version }}
|
|
clean: false
|