Skip to content

Commit

Permalink
ci: dynamically set environment name
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron de las Alas committed Sep 29, 2023
1 parent bd58c71 commit 9fc6683
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ on:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: staging
environment: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }}
steps:
- uses: actions/checkout@v4
- run: echo ${{vars.AWS_REGION}}
# - name: Use Node 17x
# uses: actions/setup-node@v3
# with:
Expand All @@ -19,12 +18,12 @@ jobs:
# run: npm run test
# - name: Build Site
# run: npm run build
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# role-to-assume: ${{ secrets.AWS_OIDC_ROLE }}
# role-session-name: GitHub-Action-Role
# aws-region: "${{ vars.AWS_REGION }}"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_OIDC_ROLE }}
role-session-name: GitHub-Action-Role
aws-region: ${{ vars.AWS_REGION }}
# - name: Send Notification
# uses: voxmedia/github-action-slack-notify-build@v1
# with:
Expand Down

0 comments on commit 9fc6683

Please sign in to comment.