Merge pull request #10 from hanzki/holiday-exchange-rates #23
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
name: Deploy to AWS | |
on: | |
push: | |
branches: | |
- master | |
env: | |
AWS_REGION: us-east-1 | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build project | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm test | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@master | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Install CDK dependencies | |
run: npm ci | |
working-directory: ./rsu-tax-calculator-cdk | |
- name: Synth stack | |
run: yarn cdk synth -c accountId=${{ secrets.AWS_ACCOUNT_ID }} -c sourcePath=../build | |
working-directory: ./rsu-tax-calculator-cdk | |
- name: Deploy stack | |
run: yarn cdk deploy --all --require-approval never -c accountId=${{ secrets.AWS_ACCOUNT_ID }} -c sourcePath=../build | |
working-directory: ./rsu-tax-calculator-cdk |