Skip to content

updated to fix issue with timestamp being expected #52

updated to fix issue with timestamp being expected

updated to fix issue with timestamp being expected #52

Workflow file for this run

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: Install uv
uses: astral-sh/setup-uv@v5
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: ensure pip
run: python -m ensurepip --upgrade
- name: which pip
run: which pip
- 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 --no-hashes > ./infrastructure/requirements.txt
- name: check requirements
run: cat infrastructure/requirements.txt
- name: install requirements
run: pip install -U -r infrastructure/requirements.txt
- name: check pip freeze
run: pip freeze
- name: install cdk
run: npm install -g aws-cdk
- name: cdk synth
run: cdk synth
working-directory: ./infrastructure
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: cdk diff
run: cdk diff --all
working-directory: ./infrastructure
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: cdk deploy
run: cdk deploy --all --require-approval never
working-directory: ./infrastructure
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 }}