Skip to content
name: Publish Management API OpenAPI Specification
on:
release:
types: [published]
jobs:
deploy:
name: Deploy OpenAPI Specifications to S3
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Publish CloudFormation Stack
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
name: developer-exp-management-api-spec-hosting
template: management/cloud-formation-stack.yml
tags: '[{"Key": "BillingGroup", "Value": "Developer Experience"}]'
no-fail-on-empty-changeset: 1
# [sc-66733] Do not publish to the root until there is an enduring solution to the
# caching issue whereby the CDN can serve a mixture of new and old schema files
# for a period after a release being published.
#
# - name: Publish latest specifications to S3
# run: |
# cd management
# aws s3 cp . s3://developer-exp-management-api-specification --recursive --exclude "*" --include "*.yaml" --acl "public-read"
- name: Publish tagged version to S3
if: startsWith(github.ref, 'refs/tags/v')
run: |
cd management
aws s3 cp . s3://developer-exp-management-api-specification/${GITHUB_REF##*/}/ --recursive --exclude "*" --include "*.yaml" --acl "public-read"