diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 035af41..8e5492d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -3,7 +3,6 @@ on: push env: AWS_REGION: us-east-1 - # CICD_ROLE: ${{ secrets.CICD_ROLE }} PIPENV_VENV_IN_PROJECT: true jobs: @@ -37,39 +36,39 @@ jobs: - name: Unit test run: make test-unit - # deploy: - # runs-on: ubuntu-latest - # if: github.ref == 'refs/heads/main' - # needs: test-unit - # timeout-minutes: 15 - # permissions: - # id-token: write - # contents: read - - # steps: - # - name: Check out repository code - # uses: actions/checkout@v2 - - # - name: Setup Python - # uses: actions/setup-python@v2 - # with: - # python-version: "3.11" - - # - name: Install pipenv - # run: python -m pip install --upgrade pipenv - - # - name: Setup Terraform - # uses: hashicorp/setup-terraform@v2 - # with: - # terraform_wrapper: false - - # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v1 - # with: - # aws-region: ${{env.AWS_REGION}} - # role-to-assume: ${{ env.CICD_ROLE }} - # role-duration-seconds: 900 - # role-skip-session-tagging: true - - # - name: Deploy to dev - # run: make + deploy: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + needs: test-unit + timeout-minutes: 15 + permissions: + id-token: write + contents: read + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: "3.11" + + - name: Install pipenv + run: python -m pip install --upgrade pipenv + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_wrapper: false + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-region: ${{env.AWS_REGION}} + role-to-assume: ${{ secrets.CI }} + role-duration-seconds: 900 + role-skip-session-tagging: true + + - name: Deploy to dev + run: make