Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Update deployment actions for production.openverse.org (#2095)
Zack Krida274d56ea32f1
diff --git a/.github/actions/production-frontend-deploy/action.yml b/.github/actions/production-deploy/action.ymlsimilarity index 84%rename from .github/actions/production-frontend-deploy/action.ymlrename to .github/actions/production-deploy/action.ymlindex 76923104c..24336ae49 100644--- a/.github/actions/production-frontend-deploy/action.yml+++ b/.github/actions/production-deploy/action.yml@@ -5,8 +5,8 @@# updated version.### !!!-name: openverse/production-frontend-nuxt-deploy-description: Update the task definition for a production-frontend-nuxt deployment+name: openverse/production-nuxt-nuxt-deploy+description: Update the task definition for a production-nuxt-nuxt deploymentinputs:tag:@@ -44,13 +44,13 @@ runs:with:payload: |{- "text": "Starting deployment of production-frontend",+ "text": "Starting deployment of production-nuxt","blocks": [{"type": "section","text": {"type": "mrkdwn",- "text": ":spinning-cd: A deployment of production-frontend triggered by <@${{ env.SLACK_USER_ID }}> is starting using the `${{ inputs.tag }}` tag."+ "text": ":spinning-cd: A deployment of production-nuxt triggered by <@${{ env.SLACK_USER_ID }}> is starting using the `${{ inputs.tag }}` tag."}},{@@ -78,11 +78,11 @@ runs:shell: bashrun: |aws ecs describe-task-definition \- --task-definition production-frontend-template \+ --task-definition production-nuxt-template \--query taskDefinition > task-definition.json# Remove template from the family name (the render action does not support this)- sed -i 's/"family": "production-frontend-template"/"family": "production-frontend"/g' task-definition.json+ sed -i 's/"family": "production-nuxt-template"/"family": "production-nuxt"/g' task-definition.json- name: Fill in the new image ID in the Amazon ECS task definitionid: task-def@@ -96,7 +96,7 @@ runs:uses: aws-actions/amazon-ecs-deploy-task-definition@v1with:task-definition: ${{ steps.task-def.outputs.task-definition }}- service: production-frontend+ service: production-nuxtcluster: production-defaultwait-for-service-stability: truewait-for-minutes: 10@@ -106,13 +106,13 @@ runs:with:payload: |{- "text": "Deployment of production-frontend successful",+ "text": "Deployment of production-nuxt successful","blocks": [{"type": "section","text": {"type": "mrkdwn",- "text": ":tadaco: The deployment of production-frontend triggered by <@${{ env.SLACK_USER_ID }}> using the `${{ inputs.tag }}` tag *succeeded*."+ "text": ":tadaco: The deployment of production-nuxt triggered by <@${{ env.SLACK_USER_ID }}> using the `${{ inputs.tag }}` tag *succeeded*."}},{@@ -134,13 +134,13 @@ runs:with:payload: |{- "text": "Deployment of production-frontend failed!",+ "text": "Deployment of production-nuxt failed!","blocks": [{"type": "section","text": {"type": "mrkdwn",- "text": ":alert: The deployment of production-frontend triggered by <@${{ env.SLACK_USER_ID }}> using the `${{ inputs.tag }}` tag *failed* :alert:"+ "text": ":alert: The deployment of production-nuxt triggered by <@${{ env.SLACK_USER_ID }}> using the `${{ inputs.tag }}` tag *failed* :alert:"}},{diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.ymlindex 8ce051ba2..fe67b41c3 100644--- a/.github/workflows/ghcr.yml+++ b/.github/workflows/ghcr.yml@@ -112,7 +112,7 @@ jobs:with:ref: main- - uses: ./.github/actions/production-frontend-deploy+ - uses: ./.github/actions/production-deploywith:tag: ${{ github.event.release.tag_name }}aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}diff --git a/.github/workflows/rollback.yml b/.github/workflows/rollback.ymlindex a9bd28b9d..4d5ea3246 100644--- a/.github/workflows/rollback.yml+++ b/.github/workflows/rollback.yml@@ -74,7 +74,7 @@ jobs:)}- - uses: ./.github/actions/production-frontend-deploy+ - uses: ./.github/actions/production-deployif: inputs.environment == 'production'with:tag: ${{ inputs.tag }}diff --git a/DEPLOYMENT.md b/DEPLOYMENT.mdindex 64b42b090..13e71a4ee 100644--- a/DEPLOYMENT.md+++ b/DEPLOYMENT.md@@ -1,9 +1,9 @@# Frontend Deployments-| Environment | Deployment Log | URL | Version Endpoint[^versions] |-| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ---------------------------------------------------------------------------------- |-| Staging | [Staging Deployment Log](https://github.com/WordPress/openverse-frontend/actions/workflows/ghcr.yml?query=branch%3Amain+event%3Apush) | <https://staging.openverse.org> | [Staging version](https://staging.openverse.org/version.json) |-| Production | [Production Deployment Log](https://github.com/WordPress/openverse-frontend/actions/workflows/ghcr.yml?query=event%3Arelease) | <https://search-production.openverse.engineering>[^production] | [Production version](https://search-production.openverse.engineering/version.json) |+| Environment | Deployment Log | URL | Version Endpoint[^versions] |+| ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------- |+| Staging | [Staging Deployment Log](https://github.com/WordPress/openverse-frontend/actions/workflows/ghcr.yml?query=branch%3Amain+event%3Apush) | <https://staging.openverse.org> | [Staging version](https://staging.openverse.org/version.json) |+| Production | [Production Deployment Log](https://github.com/WordPress/openverse-frontend/actions/workflows/ghcr.yml?query=event%3Arelease) | <https://production.openverse.org>[^production] | [Production version](https://production.openverse.org/version.json) |[^versions]:To determine the currently deployed version for any environment, visit the