Skip to content

fix: thumbnail display (#308) #180

fix: thumbnail display (#308)

fix: thumbnail display (#308) #180

name: STAGING - Deploy WEBAPP
env:
HUSKY: 0
on:
push:
branches:
- main
- "deploy-staging/**"
paths:
- apps/web/**
- .github/workflows/deploy-webapp-staging.yml
jobs:
build-web:
runs-on: ubuntu-latest
environment:
name: staging
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_WEB }}
IMAGE_TAG: ${{ github.sha }}
VITE_STRIPE_PUBLISHABLE_KEY: ${{secrets.VITE_STRIPE_PUBLISHABLE_KEY}}
VITE_SENTRY_AUTH_TOKEN: ${{secrets.SENTRY_AUTH_TOKEN}}
VITE_SENTRY_ORG: ${{secrets.SENTRY_ORG}}
VITE_SENTRY_PROJECT: ${{secrets.SENTRY_PROJECT}}
VITE_SENTRY_DSN: ${{secrets.SENTRY_DSN}}
run: |
docker build -f ./web.Dockerfile \
--build-arg VERSION=$IMAGE_TAG \
--build-arg VITE_STRIPE_PUBLISHABLE_KEY=$VITE_STRIPE_PUBLISHABLE_KEY \
--build-arg VITE_SENTRY_AUTH_TOKEN=$VITE_SENTRY_AUTH_TOKEN \
--build-arg VITE_SENTRY_ORG=$VITE_SENTRY_ORG \
--build-arg VITE_SENTRY_PROJECT=$VITE_SENTRY_PROJECT \
--build-arg VITE_SENTRY_DSN=$VITE_SENTRY_DSN \
-t $ECR_REGISTRY:$IMAGE_TAG .
docker tag $ECR_REGISTRY:$IMAGE_TAG $ECR_REGISTRY:latest
docker push $ECR_REGISTRY:$IMAGE_TAG
docker push $ECR_REGISTRY:latest
- name: Install Selleo CLI
uses: jaxxstorm/[email protected]
with:
repo: selleo/cli
tag: v0.26.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: ECS Deployment
env:
AWS_REGION: ${{ vars.AWS_REGION }}
ECS_CLUSTER: ${{ vars.AWS_ECS_CLUSTER }}
ECS_SERVICE: ${{ vars.AWS_ECS_SERVICE_WEB }}
DOCKER_IMAGE: ${{ secrets.AWS_ECR_REGISTRY_WEB }}:${{ github.sha }}
run: selleo aws ecs deploy --region $AWS_REGION --cluster $ECS_CLUSTER --service $ECS_SERVICE --docker-image $DOCKER_IMAGE