Compare commits
No commits in common. "main" and "v1" have entirely different histories.
3 changed files with 2 additions and 2 deletions
|
|
@ -4,11 +4,11 @@ on:
|
||||||
build_cmd: { required: true, type: string }
|
build_cmd: { required: true, type: string }
|
||||||
dist_dir: { required: true, type: string }
|
dist_dir: { required: true, type: string }
|
||||||
s3_bucket: { required: true, type: string }
|
s3_bucket: { required: true, type: string }
|
||||||
|
cf_dist_id: { required: true, type: string }
|
||||||
exclude_glob: { required: false, type: string, default: "" }
|
exclude_glob: { required: false, type: string, default: "" }
|
||||||
secrets:
|
secrets:
|
||||||
AWS_ACCESS_KEY_ID: { required: true }
|
AWS_ACCESS_KEY_ID: { required: true }
|
||||||
AWS_SECRET_ACCESS_KEY: { required: true }
|
AWS_SECRET_ACCESS_KEY: { required: true }
|
||||||
CF_DIST_ID: { required: true }
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -23,4 +23,4 @@ jobs:
|
||||||
EXCLUDES=""
|
EXCLUDES=""
|
||||||
[ -n "${{ inputs.exclude_glob }}" ] && for g in ${{ inputs.exclude_glob }}; do EXCLUDES="$EXCLUDES --exclude $g"; done
|
[ -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 s3 sync ${{ inputs.dist_dir }}/ s3://${{ inputs.s3_bucket }}/ --delete $EXCLUDES
|
||||||
aws cloudfront create-invalidation --distribution-id "${{ secrets.CF_DIST_ID }}" --paths "/*"
|
aws cloudfront create-invalidation --distribution-id ${{ inputs.cf_dist_id }} --paths "/*"
|
||||||
Loading…
Reference in a new issue