diff --git a/.github/workflows/cdp.yml b/.github/workflows/cdp.yml new file mode 100644 index 0000000..8246b78 --- /dev/null +++ b/.github/workflows/cdp.yml @@ -0,0 +1,36 @@ +name: AWS Service CI/CD + +on: + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: "16" + - name: Install Python dependencies and CDK + run: | + python -m pip install --upgrade pip + # install your Python dependencies here + npm install -g aws-cdk + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@master + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: "us-east-1" + - name: Deploy to AWS + run: cdk deploy --require-approval=never