Skip to content

Commit 894dafa

Browse files
fix lambda deployment
1 parent e9cf03a commit 894dafa

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.github/workflows/lambda.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Post-Deploy Lambda
22

33
on:
4-
deployment:
4+
deployment_status:
55

66
jobs:
77
deploy-lambdas:
@@ -11,14 +11,20 @@ jobs:
1111

1212
- name: Show deployment info
1313
run: |
14-
echo "Deployment environment: $DEPLOYMENT_ENVIRONMENT"
14+
echo "Deployment environment: ${{ github.event.deployment.environment }}"
1515
16-
- name: Run Lambda deploy
16+
- name: Run Lambda production deploy
17+
if: >
18+
github.event.deployment.environment == 'documentcloud-prod' &&
19+
github.event.deployment_status.state == 'success'
1720
run: |
18-
if [[ "$DEPLOYMENT_ENVIRONMENT" == "documentcloud-staging" ]]; then
19-
echo "Deploying staging lambda updates"
20-
bash config/aws/lambda/codeship_deploy_lambdas.sh staging-lambda --staging
21-
else
22-
echo "Deploying production lambda updates"
23-
bash config/aws/lambda/codeship_deploy_lambdas.sh prod-lambda
24-
fi
21+
echo "Deploying production lambda updates"
22+
bash config/aws/lambda/codeship_deploy_lambdas.sh prod-lambda
23+
24+
- name: Run Lambda staging deploy
25+
if: >
26+
github.event.deployment.environment == 'documentcloud-staging' &&
27+
github.event.deployment_status.state == 'success'
28+
run: |
29+
echo "Deploying staging lambda updates"
30+
bash config/aws/lambda/codeship_deploy_lambdas.sh staging-lambda --staging

0 commit comments

Comments
 (0)