Skip to content

Commit

Permalink
feat: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Oct 17, 2024
1 parent afe81d4 commit 038c5d0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy CDK

on:
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
environment: dev

steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_CDK_DEPLOY_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-session-name: GitHubActionsCDKDeploy
role-duration-seconds: 900 # Adjust as necessary

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18 # Use the node version matching your project

- name: Install dependencies
run: |
npm install -g aws-cdk
npm ci # Install project dependencies from package-lock.json
- name: Deploy CDK to dev environment
run: |
cdk deploy --require-approval never
env:
AWS_REGION: ${{ vars.AWS_REGION }}
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID }}
SSL_CERTIFICATE_ARN: ${{ vars.SSL_CERTIFICATE_ARN }}
HOSTNAME: ${{ vars.HOSTNAME }}
STAGE: ${{ vars.STAGE }}
KEYCLOAK_VERSION: ${{ vars.KEYCLOAK_VERSION }}
2 changes: 1 addition & 1 deletion cdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app": "npx ts-node --prefer-ts-exts deploy/veda-keycloak.ts",
"app": "npx ts-node --prefer-ts-exts deploy/app.ts",
"watch": {
"include": ["**"],
"exclude": [
Expand Down

0 comments on commit 038c5d0

Please sign in to comment.