From 9a9251ac07f0f398a1758f2cad17a7cd73f36230 Mon Sep 17 00:00:00 2001 From: Cesar Faber Date: Thu, 25 Jan 2024 12:39:33 -0300 Subject: [PATCH] build script created --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9175418 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: 📦 Build +run-name: 📦 Build triggered +on: push +jobs: + build: + name: cesarolvr.com build + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - uses: actions/checkout@master + + - name: install node.js + uses: actions/setup-node@v1 + with: + node-version: "18.x" + + - name: install app dependencies + run: yarn + + - name: building app + run: yarn build + + - name: uploading to S3 + run: | + aws s3 sync ./public s3://cesarolvr + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} + AWS_DEFAULT_REGION: us-east-1 + + - name: Invalidate cloudfront + run: aws cloudfront create-invalidation --distribution-id EI0DQ7VKOZ8XL --paths "/*" --region us-east-1