Skip to content

Commit

Permalink
chore: minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
m-sureshraj committed Jan 7, 2024
1 parent a9c49cd commit 62e9aa7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/deploy-to-dev-env.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
name: deploy the selected branch to the development (dev) environment
# This manual workflow allows us to deploy an example project to the development environment.
# It must be triggered manually and requires the name of the example project as its input.
# It uses AWS OpenID Connect (OIDC) for secure authenticate with AWS to deploy the necessary resources.

name: deploy an example project to the development environment

on:
workflow_dispatch:
inputs:
directory_name:
description: 'project directory name'
description: 'Which example project do you want to deploy'
required: true

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

env:
AWS_REGION : 'eu-west-2'

defaults:
run:
working-directory: ${{ github.event.inputs.directory_name }}

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.event.inputs.directory_name }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
Expand All @@ -41,6 +45,8 @@ jobs:
needs: build # This job depends on the build job.
runs-on: ubuntu-latest
environment: development
permissions:
id-token: write # Fetch an OpenID Connect (OIDC) token.
steps:
- name: Git clone the repository
uses: actions/checkout@v4
Expand All @@ -63,13 +69,11 @@ jobs:
aws-region: ${{ env.AWS_REGION }}

- name: versions
working-directory: ./deployment-with-github-actions
run: |
echo "printing working directory - $(pwd)"
echo "node version - $(node -v)"
echo "aws cli version - $(aws --version)"
echo "sls version - $(./node_modules/.bin/sls --version)"
- name: deploy
working-directory: ./deployment-with-github-actions
run: npm run deploy:dev

0 comments on commit 62e9aa7

Please sign in to comment.