production-deployment #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to production environment | |
# Controls when the action will run | |
on: | |
# Triggers the workflow on repository-dispatch event | |
repository_dispatch: | |
types: [production-deployment] | |
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy | |
jobs: | |
graasp-deploy-ecs-workflow: | |
# Replace with repository name | |
name: CD caller template | |
# Replace 'main' with the hash of a commit, so it points to an specific version of the reusable workflow that is used | |
uses: graasp/graasp-deploy/.github/workflows/library-deploy-prod.yml@v1 | |
# abort previous deployment if a newer one is in progress | |
concurrency: | |
group: deploy-production | |
cancel-in-progress: true | |
# Replace input ecs-task-definition with template file. Format: '.aws/<name>-prod.json' | |
with: | |
app-name: graasp-library | |
app-version: ${{ github.event.client_payload.tag }} | |
next-public-graasp-account-host: ${{ vars.NEXT_PUBLIC_GRAASP_ACCOUNT_HOST_PROD }} | |
ecs-task-definition: '.aws/graasp-library-prod.json' | |
tag: ${{ github.event.client_payload.tag }} | |
# Insert required secrets based on repository with the following format: ${{ secrets.SECRET_NAME }} | |
secrets: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }} | |
aws-region: ${{ secrets.AWS_REGION_PROD }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }} | |
container-name-library: ${{ secrets.CONTAINER_NAME_GRAASP_EXPLORE_PROD }} | |
ecr-repository: ${{ secrets.ECR_REPOSITORY_GRAASP_EXPLORE_PROD }} | |
ecs-cluster: ${{ secrets.ECS_CLUSTER_GRAASP_EXPLORE_PROD }} | |
ecs-service: ${{ secrets.ECS_SERVICE_GRAASP_EXPLORE_PROD }} | |
next-public-api-host: ${{ secrets.NEXT_PUBLIC_API_HOST_PROD }} | |
next-public-domain: ${{ secrets.REACT_APP_DOMAIN_PROD }} | |
next-public-ga-measurement-id: ${{ secrets.REACT_APP_GA_MEASUREMENT_ID_PROD }} | |
next-public-graasp-analytics-host: ${{ secrets.ANALYZER_CLIENT_HOST_PROD }} | |
next-public-graasp-auth-host: ${{ secrets.NEXT_PUBLIC_GRAASP_AUTH_HOST_PROD }} | |
next-public-graasp-builder-host: ${{ secrets.BUILDER_CLIENT_HOST_PROD }} | |
next-public-graasp-perform-host: ${{ secrets.PLAYER_CLIENT_HOST_PROD }} | |
next-public-graasper-id: ${{ secrets.NEXT_PUBLIC_GRAASPER_ID }} | |
next-public-show-notifications: ${{ secrets.NEXT_PUBLIC_SHOW_NOTIFICATIONS }} | |
next-public-sentry-dsn: ${{ secrets.SENTRY_DSN }} | |
next-public-sentry-env: production | |
port: ${{ secrets.PORT }} |