refactor(api): add spring application properties reference to applica… #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bundle and deploy OpenAPI to GitHub Pages | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "f1api/openapi/**" | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
# https://github.com/peter-evans/create-pull-request | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
bundle-openapi: | |
name: Bundle OpenAPI | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
env: | |
REMOVE_TAGS_SCRIPT: ./f1api/openapi/remove-tags.sh | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
# Use latest node version | |
node-version: "*" | |
- name: Install redocly cli | |
run: npm install -g ${{ vars.REDOCLY_CLI }} | |
- name: Bundle public OpenAPI spec | |
run: redocly bundle f1api --config ${{ vars.REDOCLY_CLI_CONFIG }} -o ${{ vars.BUNDLED_OPENAPI_SPEC }} | |
- name: Remove unnecessary tags from bundled OpenAPI spec | |
run: chmod -v u+x ${{ env.REMOVE_TAGS_SCRIPT }} && ${{ env.REMOVE_TAGS_SCRIPT }} ${{ vars.BUNDLED_OPENAPI_SPEC }} | |
- name: Bundle internal OpenAPI spec | |
run: redocly bundle f1api-internal --config ${{ vars.REDOCLY_CLI_CONFIG }} -o ${{ vars.BUNDLED_INTERNAL_OPENAPI_SPEC }} | |
- name: Setup GitHub Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./github-pages/swaggerui | |
deploy-openapi: | |
name: Deploy OpenAPI to GitHub Pages | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: bundle-openapi | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |