Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Deploy frontend to staging
Dhruv Bhanushali642c559fbf1e
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex 0217a07ce..5439e41cc 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -10,6 +10,11 @@ on:types:- publishedworkflow_dispatch:+ input:+ image_tag:+ description: "The tag to assign to the images built in the workflow."+ type: string+ required: trueconcurrency:group: ${{ github.workflow }}-${{ github.event_name == 'release' && 'release' || github.ref }}@@ -33,7 +38,9 @@ jobs:- name: Get image tagid: get-image-tagrun: |- if [[ "${{ github.event_name }}" == "release" ]]; then+ if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then+ echo "image-tag=${{ inputs.image_tag }}" >> "$GITHUB_OUTPUT"+ elif [[ "${{ github.event_name }}" == "release" ]]; thenecho "image-tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"elseecho "image-tag=${{ github.sha }}" >> "$GITHUB_OUTPUT"@@ -827,3 +834,32 @@ jobs:docker tag openverse-${{ matrix.image }} \ghcr.io/wordpress/openverse-${{ matrix.image }}:${{ needs.get-image-tag.outputs.image-tag }}docker push --all-tags ghcr.io/wordpress/openverse-${{ matrix.image }}++ ##############+ # Deployment #+ ##############++ deploy-frontend:+ name: Deploy staging frontend+ runs-on: ubuntu-latest+ if: github.event_name == 'push'+ needs:+ - get-image-tag+ - nuxt-build+ - nuxt-playwright-e2e+ - nuxt-playwright-vr+ - storybook-playwright+ - publish-images++ steps:+ - name: Checkout repository+ uses: actions/checkout@v3++ - name: Deploy to staging+ uses: ./.github/actions/staging-nuxt-deploy+ with:+ tag: ${{ needs.get-image-tag.outputs.image-tag }}+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}+ slack-webhook: ${{ secrets.SLACK_WEBHOOK_URL }}+ gh-slack-username-map: ${{ secrets.GH_SLACK_USERNAME_MAP }}