Skip to content

Sync S3

Sync S3 #70

Workflow file for this run

name: Sync S3
on:
workflow_dispatch:
jobs:
sync-s3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./next-app
permissions:
id-token: write
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure AWS credentials via OIDC
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: us-east-1
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.16
- name: Add API Gateway Identifier
run: |
cd app/auth
sed -i "s|GATEWAY_PLACEHOLDER_URL|${{ secrets.API_GATEWAY_URL }}|g" auth-details.ts
grep -q "${{ secrets.API_GATEWAY_URL }}" auth-details.ts && echo "URL replaced successfully!" || exit 1
- name: Export Static Site
run: |
bun i
bun run build
- name: Upload to S3
run: |
cd ../scripts
chmod +x s3.sh
./s3.sh "brutus.ettukube.com" ../next-app/out