diff --git a/static-aws.yml b/static-aws.yml index ba546b9..1ff7efc 100644 --- a/static-aws.yml +++ b/static-aws.yml @@ -4,11 +4,11 @@ on: build_cmd: { required: true, type: string } dist_dir: { required: true, type: string } s3_bucket: { required: true, type: string } - cf_dist_id: { required: true, type: string } exclude_glob: { required: false, type: string, default: "" } secrets: AWS_ACCESS_KEY_ID: { required: true } AWS_SECRET_ACCESS_KEY: { required: true } + CF_DIST_ID: { required: true } jobs: deploy: runs-on: ubuntu-latest @@ -23,4 +23,4 @@ jobs: EXCLUDES="" [ -n "${{ inputs.exclude_glob }}" ] && for g in ${{ inputs.exclude_glob }}; do EXCLUDES="$EXCLUDES --exclude $g"; done aws s3 sync ${{ inputs.dist_dir }}/ s3://${{ inputs.s3_bucket }}/ --delete $EXCLUDES - aws cloudfront create-invalidation --distribution-id ${{ inputs.cf_dist_id }} --paths "/*" + aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_ID }} --paths "/*"