mirror of
https://github.com/Sea-Haven-Industries/seahaven-site.git
synced 2026-09-30 06:33:16 +00:00
Create main.yml
This commit is contained in:
parent
479602bb8d
commit
202a409f0f
1 changed files with 32 additions and 0 deletions
32
.github/workflows/main.yml
vendored
Normal file
32
.github/workflows/main.yml
vendored
Normal file
|
|
@ -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"
|
||||
Loading…
Add table
Reference in a new issue