diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bf39b8136..586476195 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,6 +24,21 @@ jobs: working-directory: site run: pnpm build + - 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-east-1 + + - name: Sync bucket + run: | + cd ./site/dist + aws s3 sync . s3://api2static.teamlab.info --delete + + - name: Invalidate CLOUDFRONT cache + run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID }} + # - name: Publish Site # Once the content has been built, you can find it in the `./site/dist` # directory. Be aware that this directory could contain as many as 5000