Skip to content

Update https://www.tokenscript.org/schemas/ #2

Update https://www.tokenscript.org/schemas/

Update https://www.tokenscript.org/schemas/ #2

name: "Update https://www.tokenscript.org/schemas/"
on:
push:
branches:
- prod
paths:
- src/schema/
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: deploy
env:
S3_BUCKET: tokenscript-org-website
CLOUDFRONT_ID: EHA6852DAV0ZG
run: |
aws s3 sync src/schema/ "s3://${S3_BUCKET}/schemas/" --cache-control 'max-age=600,s-maxage=31536000' --quiet \
&& aws cloudfront create-invalidation --distribution-id "${CLOUDFRONT_ID}" --paths '/schemas/*'