From a92f6c9b844ed2c418f1294a2090f1e160d7dd08 Mon Sep 17 00:00:00 2001 From: Noah Kantrowitz Date: Thu, 21 Mar 2024 22:11:51 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20CI=20config=20for=20publishing?= =?UTF-8?q?=20to=20S3.=20(#19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..e8106a37 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,32 @@ +name: publish + +on: + push: + branches: + - master + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-east-1 + role-to-assume: arn:aws:iam::353102230615:role/cardconjurer-publish + + - name: Restore file timestamps + uses: chetan/git-restore-mtime-action@v2 + + - name: Sync files to the S3 bucket + run: | + aws s3 sync --exclude '.git/*' --delete ./ s3://cardconjurer.app/