Skip to content

Commit

Permalink
Merge pull request #399 from NYPL/main
Browse files Browse the repository at this point in the history
update eds link
  • Loading branch information
charmingduchess authored Nov 21, 2024
2 parents 5291686 + 3c84d8b commit 3b5c0d2
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- qa
- SCC-4218/move-rc-from-travis-to-github-actions

permissions:
id-token: write
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/deploy_train.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Deploys to research-catalog-train
name: deploy train

on:
push:
branches:
- train
- set-up-train-env
- hold-pages

permissions:
id-token: write
contents: read

env:
AWS_DEFAULT_REGION: us-east-1
LOCAL_TAG_NAME: research-catalog:${{ github.ref_name }}-${{ github.run_number }}
ECR_URL: 946183545209.dkr.ecr.us-east-1.amazonaws.com/research-catalog:train-latest

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::946183545209:role/GithubActionsDeployerRole
aws-region: us-east-1

- name: Log in to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build and push Docker image to Amazon ECR
run: |
docker build --build-arg NEXT_PUBLIC_APP_ENV=qa --tag $LOCAL_TAG_NAME .
docker tag $LOCAL_TAG_NAME $ECR_URL
# Re-tag last latest image just in case
MANIFEST=$(aws ecr batch-get-image --repository-name research-catalog --image-ids imageTag="train-latest" --output json | jq --raw-output --join-output '.images[0].imageManifest')
aws ecr batch-delete-image --repository-name research-catalog --image-ids imageTag="train-previous" || true
aws ecr put-image --repository-name research-catalog --image-tag "train-previous" --image-manifest "$MANIFEST" || true
docker push $ECR_URL
- name: Update ECS service
run: |
aws ecs update-service --cluster research-catalog-train --service research-catalog-train --force-new-deployment
4 changes: 2 additions & 2 deletions src/components/EDSBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const EDSBanner = () => {
<span style={{ color: "var(--nypl-colors-ui-success-primary)" }}>
New!
</span>{" "}
Try our{" "}
Try{" "}
<ExternalLink href="https://discovery.ebsco.com/c/tvrejk?acr_values=guest">
<b style={{ color: "var(--nypl-colors-ui-link-primary" }}>
Article Search
Article Plus
</b>
</ExternalLink>{" "}
to discover online journals, books, and more from home with your
Expand Down

0 comments on commit 3b5c0d2

Please sign in to comment.