updated aws build config #37
Workflow file for this run
This file contains hidden or 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 CDK Project | |
| on: | |
| push: | |
| tags: | |
| - '**' | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - closed | |
| jobs: | |
| deployment: | |
| if: github.event.pull_request.merged == true || github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| environment: PythonWA AWS | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: npm install | |
| working-directory: ./frontend | |
| run: npm install | |
| - name: npm build | |
| working-directory: ./frontend | |
| run: npm run build | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.13 | |
| cache: pip | |
| - name: Install pipenv | |
| run: pip install pipenv | |
| - name: pipenv to requirements.txt | |
| run: pipenv requirements > infrastructure/requirements.txt | |
| - name: cdk diff | |
| uses: youyo/aws-cdk-github-actions@v2 | |
| with: | |
| cdk_subcommand: 'diff' | |
| cdk_stack: '--all' | |
| working_dir: './infrastructure' | |
| actions_comment: true | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PYTHON_WA_API_KEY: ${{ secrets.PYTHON_WA_API_KEY }} | |
| - name: deploy | |
| uses: youyo/aws-cdk-github-actions@v2 | |
| with: | |
| cdk_subcommand: 'deploy' | |
| cdk_stack: '--all' | |
| cdk_args: '--require-approval never' | |
| working_dir: './infrastructure' | |
| actions_comment: false | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| PYTHON_WA_API_KEY: ${{ secrets.PYTHON_WA_API_KEY }} |