Merge pull request #67 from adzerk/dependabot/npm_and_yarn/axios-and-… #75
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: 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" |