-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0513aa8
commit 60a11a8
Showing
1 changed file
with
11 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
env: | ||
PACKAGE_LOCATION: packages/app | ||
ZAMBDAS_LOCATION: packages/zambdas | ||
SLACK_NOTIFICATION_SERVICE_NAME: bh-intake-ui | ||
SLACK_NOTIFICATION_SERVICE_NAME: zapehr-telehealth | ||
|
||
runs-on: ubuntu-latest | ||
environment: ${{ github.event.inputs.environment }} | ||
|
@@ -53,6 +53,7 @@ jobs: | |
with: | ||
ssh-private-key: | | ||
${{ secrets.ZAPEHR_TELEHEALTH_PRIVATE_SSH_KEY }} | ||
${{ secrets.BUMP_VERSION }} | ||
- name: If environment is production, ensure keys are coming in through input parameters. | ||
if: ${{ github.event.inputs.environment == 'production' && !(github.event.inputs.confirmProduction == 'Yes') }} | ||
|
@@ -76,7 +77,7 @@ jobs: | |
json: ${{ secrets.TELEHEALTH_SECRETS_JSON }} | ||
|
||
- name: Move env file into .env folder | ||
run: mkdir -p ${{ env.ZAMBDAS_LOCATION }}/.env/ && cp secrets.json ${{ env.ZAMBDAS_LOCATION }}/.env/${{ secrets.ENVIRONMENT }}.json | ||
run: mkdir -p ${{ env.ZAMBDAS_LOCATION }}/.env/ && mv secrets.json ${{ env.ZAMBDAS_LOCATION }}/.env/${{ secrets.ENVIRONMENT }}.json | ||
|
||
- name: Increase version if input dictates. | ||
if: ${{ github.event.inputs.incrementVersion == 'true' }} | ||
|
@@ -95,20 +96,18 @@ jobs: | |
- name: Get Version Number from package.json for build notifications. | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
with: | ||
path: ${{ env.PACKAGE_LOCATION }} | ||
|
||
- name: Install dependencies | ||
run: pnpm ci | ||
|
||
## todo | ||
- name: Deploy app | ||
run: cd ${{ env.PACKAGE_LOCATION }} && pnpm run ci-deploy:${{ env.ENVIRONMENT }} | ||
## todo | ||
run: cd ${{ env.PACKAGE_LOCATION }} && pnpm run ci-deploy:${{ github.event.inputs.environment }} | ||
- name: Setup zapehr secrets | ||
run: cd ${{ env.ZAMBDAS_LOCATION }} && pnpm run setup-zapehr-secrets ${{ env.ENVIRONMENT }} | ||
## todo | ||
run: cd ${{ env.ZAMBDAS_LOCATION }} && pnpm run setup-zapehr-secrets ${{ github.event.inputs.environment }} | ||
- name: Deploy zambdas | ||
run: cd ${{ env.ZAMBDAS_LOCATION }} && pnpm run deploy-zambdas ${{ env.ENVIRONMENT }} | ||
run: cd ${{ env.ZAMBDAS_LOCATION }} && pnpm run deploy-zambdas ${{ github.event.inputs.environment }} | ||
|
||
- name: Notify Slack | ||
if: always() | ||
|
@@ -118,11 +117,11 @@ jobs: | |
BRANCH: ${{ github.ref }} | ||
PACKAGE_VERSION: ${{ steps.package-version.outputs.current-version }} | ||
with: | ||
channel: '#pm-pediatrics-notifications' | ||
channel: '#zapehr-notifications' | ||
status: ${{ job.status }} | ||
success_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build completed successfully' | ||
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build failed' | ||
cancelled_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) build was cancelled' | ||
success_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) deploy completed successfully' | ||
failure_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) deploy failed' | ||
cancelled_text: '${env.GITHUB_WORKFLOW} (${env.GITHUB_RUN_NUMBER}) deploy was cancelled' | ||
fields: | | ||
[{ "title": "Service", "value": "${env.SLACK_NOTIFICATION_SERVICE_NAME}", "short": true }, | ||
{ "title": "Action URL", "value": "${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}"}, | ||
|