Skip to content

Merge pull request #60 from adzerk/rs/48713 #64

Merge pull request #60 from adzerk/rs/48713

Merge pull request #60 from adzerk/rs/48713 #64

name: Publish Management API OpenAPI Specification
on:
push:
branches: [master]
tags: [v*]
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
- 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"