Skip to content

Commit

Permalink
[skip ci] Update build-and-deploy-docs-workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne authored Nov 6, 2023
1 parent 666e641 commit bafab91
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/build-and-deploy-docs-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,14 @@ on:
workflow_call:
inputs:
package_name:
type: string
required: false
description: "(Deprecated, use package-name instead) The name of the package to build docs for."
package-name:
type: string
required: false
description: "The name of the package to build docs for."
default: ${{ inputs.package_name }}
modules:
type: string
required: true
description: "The modules in the package to build docs for."
pathsToInvalidate:
type: string
required: false
description: "(Deprecated, use invalidate-paths instead) The paths to invalidate in CloudFront, e.g. '/vapor /xctvapor'."
invalidate-paths:
type: string
required: false
description: "The paths to invalidate in CloudFront, e.g. '/vapor/* /xctvapor/*'."
Expand All @@ -32,23 +23,23 @@ on:
type: string
required: true
description: "The repository of the package to build docs for."
package-name:
package_name:
type: string
required: true
description: "The name of the package to build docs for."
modules:
type: string
required: true
description: "The modules in the package to build docs for."
invalidate-paths:
pathsToInvalidate:
type: string
required: true
description: "The paths to invalidate in CloudFront, e.g. '/vapor/* /xctvapor/*'."
env:
INPUT_REPOSITORY: ${{ inputs.repository || github.repository }}
INPUT_PACKAGE_NAME: ${{ inputs.package-name || inputs.package_name }}
INPUT_PACKAGE_NAME: ${{ inputs.package_name }}
INPUT_MODULES: ${{ inputs.modules }}
INPUT_INVALIDATE_PATHS: ${{ inputs.invalidate-paths || inputs.pathsToInvalidate }}
INPUT_INVALIDATE_PATHS: ${{ inputs.pathsToInvalidate }}

jobs:
build-docs:
Expand Down Expand Up @@ -81,8 +72,10 @@ jobs:
- name: Deploy to S3
env:
S3_BUCKET_URL: ${{ secrets.VAPOR_API_DOCS_S3_BUCKET_URL }}
run: 'aws s3 sync ./public "${S3_BUCKET_URL}" --no-progress --acl public-read'
run: |
aws s3 sync ./public "${S3_BUCKET_URL}" --no-progress --acl public-read
- name: Invalidate CloudFront
env:
DISTRIBUTION_ID: ${{ secrets.VAPOR_API_DOCS_DISTRIBUTION_ID }}
run: 'aws cloudfront create-invalidation --distribution-id "${DISTRIBUTION_ID}" --paths "${INPUT_INVALIDATE_PATHS}"'
run: |
aws cloudfront create-invalidation --distribution-id "${DISTRIBUTION_ID}" --paths "${INPUT_INVALIDATE_PATHS}"

0 comments on commit bafab91

Please sign in to comment.