Skip to content

Merge pull request #401 from systemaccounting/400-make-env-local-default #19

Merge pull request #401 from systemaccounting/400-make-env-local-default

Merge pull request #401 from systemaccounting/400-make-env-local-default #19

name: prod-services-deploy
on:
push:
paths:
- 'services/**'
- 'crates/**'
- 'migrations/schema/*'
- 'migrations/seed/*'
- 'client/**'
- 'docker/**'
branches:
- 'master'
jobs:
deploy_prod:
name: deploy services to prod cloud environment
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
steps:
- uses: actions/checkout@v4
- name: mask values
run: echo "::add-mask::${{ secrets.AWS_ACCOUNT_ID }}"
- name: deploy services to prod cloud environment
run: |
for app in $(bash scripts/list-deployments.sh | grep -v client | xargs basename -a); do
# tag newly pushed prod images with master merge commit sha
bash scripts/tag-merge-commit.sh --app-name $app --env prod --env-id ${{ secrets.PROD_ENV_ID }};
# deploy newly tagged images to prod cloud
bash scripts/deploy-last-image.sh --app-name $app --env prod --env-id ${{ secrets.PROD_ENV_ID }};
done