Deploy With CDK #9
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 With CDK | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
id-token: write | |
concurrency: | |
group: deploy | |
cancel-in-progress: false | |
jobs: | |
run-cdk-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.ASSUME_ROLE }} | |
aws-region: us-west-2 | |
role-duration-seconds: 900 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Zig toolchain | |
uses: korandoru/setup-zig@v1 | |
with: | |
zig-version: 0.10.0 | |
- name: Install Cargo Lambda | |
uses: jaxxstorm/action-install-gh-release@v1.9.0 | |
with: | |
repo: cargo-lambda/cargo-lambda | |
platform: linux | |
arch: x86_64 | |
- name: npm install | |
run: | | |
npm install | |
- name: run cdk deploy | |
env: | |
DOMAIN_NAME: ${{ secrets.DOMAIN_NAME }} | |
EMAIL: ${{ secrets.EMAIL }} | |
run: | | |
npm run deploy |