From 202a409f0fe34b9412f35701871a530b740bf076 Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Thu, 17 Jul 2025 18:35:17 -0400 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7b9b437 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +name: Deploy Static Site to S3 + +on: + push: + branches: + - static # Deploys only when pushing to 'static' branch + +permissions: + id-token: write # Required for OIDC + contents: read # Allows checkout of repo + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Configure AWS credentials using OIDC + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: arn:aws:iam::328440206208:role/githubdeploy_seahavensite + aws-region: us-east-1 + + - name: Sync files to S3 + run: | + aws s3 sync . s3://seahaven.com \ + --delete \ + --exclude ".git/*" \ + --exclude ".github/*" \ + --exclude "*.md"