Skip to content

Update aws-actions/configure-aws-credentials to v4 for Node.js 24 com… #159

Update aws-actions/configure-aws-credentials to v4 for Node.js 24 com…

Update aws-actions/configure-aws-credentials to v4 for Node.js 24 com… #159

name: Deploy to AWS S3 Staging
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
env:
PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Update @explorills packages to latest
run: bun update --latest @explorills/one-ecosystem-ui
env:
PACKAGES_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
- name: Build project
run: bun run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Deploy to S3 Staging
run: |
aws s3 sync ./dist/ s3://expl-one-hype-staging/ --delete
- name: Invalidate CloudFront cache
run: |
DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Origins.Items[?contains(DomainName, 'expl-one-hype-staging')]].Id" --output text)
aws cloudfront create-invalidation --distribution-id $DIST_ID --paths "/*"