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/