test: sync thumb images

This commit is contained in:
neil 2022-10-29 10:43:03 +08:00
parent fb788fbc4c
commit 1c18bb9dbc
3 changed files with 21 additions and 11 deletions

View file

@ -29,6 +29,3 @@ done
# replace packages.json with the updated version with localized image links # replace packages.json with the updated version with localized image links
mv $temp_packages $1 mv $temp_packages $1
# upload thumb images to production cdn
aws s3 sync ./packages_thumbs_images s3://www.tea.xyz/Images/packages

View file

@ -71,6 +71,7 @@ jobs:
--exclude 'pour.sh' \ --exclude 'pour.sh' \
--exclude 'tea.white-paper*.pdf' \ --exclude 'tea.white-paper*.pdf' \
--exclude '*.md' \ --exclude '*.md' \
--exclude 'public/Images/packages/*' \
--delete --delete
#TODO create a github-action that can be used to parse the #TODO create a github-action that can be used to parse the

View file

@ -92,17 +92,23 @@ jobs:
with: with:
cmd: '.github/build-package-pages.sh src/data/packages.json src/content/packages' cmd: '.github/build-package-pages.sh src/data/packages.json src/content/packages'
- uses: aws-actions/configure-aws-credentials@v1 - name: Download package thumbnails from Airtable
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: Download and Upload package thumbnails from Airtable
uses: getneil/jq-action@v1 uses: getneil/jq-action@v1
with: with:
cmd: '.github/prepare-thumb-images.sh src/data/packages.json' cmd: '.github/prepare-thumb-images.sh src/data/packages.json'
- name: Upload package thumbnails to AWS S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: www.tea.xyz
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: 'packages_thumbs_images'
DEST_DIR: 'Images/packages'
# - run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }} # - run: .github/mk-pantry-accessible.sh ${{ secrets.TEMP_JACOBS_GITHUB_PAT }}
# - uses: teaxyz/setup@v0 # - uses: teaxyz/setup@v0
@ -124,6 +130,12 @@ jobs:
# with: # with:
# working-directory: .cdk # working-directory: .cdk
# - 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: Deploy to AWS # - name: Deploy to AWS
# id: cdk_deploy # id: cdk_deploy
# run: yarn deploy # run: yarn deploy