github actions to install to system python #40
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: | |
| - 'v*' | |
| # 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@v5 | |
| # with: | |
| # python-version: 3.13 | |
| # cache: pip | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install the project | |
| run: uv sync --all-extras --dev --python-preference only-system | |
| - name: uv to requirements.txt | |
| run: uv export --project pyproject.toml --no-emit-project > 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 }} |