Skip to content

Commit

Permalink
Removed ref so that it defaults to master
Browse files Browse the repository at this point in the history
  • Loading branch information
niroj committed Apr 24, 2023
1 parent 9346020 commit 8bc2373
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/sync-to-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ jobs:
runs-on: ubuntu-latest
# https://github.com/marketplace/actions/s3-sync
steps:
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
- name: checkout repo
uses: actions/checkout@master
with:
# need at least 2 here so we can get a proper log in getting updated filed before invalidate step
fetch-depth: 2
- name: sync with S3
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete --exclude '.git/*' --exclude '.github/*'
args: --follow-symlinks --delete --exclude '.git/*' --exclude '.github/*' --size-only
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -27,13 +32,6 @@ jobs:
# giving some time for things to settle down between s3 and cloudfront
# may not need this time since there usaually no sync up needed between s3 and cloudfront
time: 10s
- name: checkout dist
uses: actions/checkout@master
with:
ref: dist
# need at least 2 here so we can get a proper log in next step
fetch-depth: 2

- name: get updated files
run: |
# allow grep to fail
Expand All @@ -47,7 +45,7 @@ jobs:
[[ "$file" == *"/index.html" ]] && echo $file | sed -e 's/\/index.html$/\//'
done | sort | uniq | tr '\n' ' ' > .updated_files
- name: invalidate
- name: invalidate Cloudfront
uses: chetan/invalidate-cloudfront-action@v2
env:
PATHS_FROM: .updated_files
Expand Down

0 comments on commit 8bc2373

Please sign in to comment.