From 736338cfa6954532ec12453925111f84b04594dc Mon Sep 17 00:00:00 2001 From: Russ Biggs Date: Tue, 20 Aug 2024 11:45:31 -0600 Subject: [PATCH] aws deployment --- .github/workflows/build.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fdb11f..085093b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,8 +24,21 @@ jobs: - name: Build static site run: npm run build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + - uses: jakejarvis/s3-sync-action@master with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + args: --acl public-read --follow-symlinks --delete + env: + SOURCE_DIR: 'dist' + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + + - name: invalidate + uses: chetan/invalidate-cloudfront-action@master + env: + DISTRIBUTION: ${{ secrets.AWS_CF_DISTRIBUTION_ID }} + PATHS: '/*' + AWS_REGION: ${{ secrets.AWS_REGION }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}