Skip to content

Commit

Permalink
Sync actual build artifacts with s3 bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
danilapog committed Jul 4, 2024
1 parent fdf32e8 commit a1f5344
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1f5344

Please sign in to comment.