From 2e89dc46c2da02099e666d72039b6caaefa1eb8b Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Mon, 12 Aug 2024 20:36:15 -0500 Subject: [PATCH] deploy next to s3 --- .github/workflows/deploy-next.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/deploy-next.yml diff --git a/.github/workflows/deploy-next.yml b/.github/workflows/deploy-next.yml new file mode 100644 index 000000000..9915d3810 --- /dev/null +++ b/.github/workflows/deploy-next.yml @@ -0,0 +1,33 @@ +name: Deploy Next Version +on: + push: + branches: + - next + +jobs: + run: + runs-on: ubuntu-latest + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: yarn + + - name: Build + run: yarn build + + - name: Deploy + uses: reggionick/s3-deploy@v4 + with: + folder: dist + bucket: ${{ secrets.S3_BUCKET }} + bucket-region: ${{ secrets.S3_BUCKET_REGION }} + dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} + invalidation: / + delete-removed: true + no-cache: true + private: true + files-to-include: "{.*/**,**}"