Skip to content

chore(deps): upgrade dependencies #1360

chore(deps): upgrade dependencies

chore(deps): upgrade dependencies #1360

Workflow file for this run

name: Deploy
on:
# To re-enable "prod" deploy, uncomment following lines.
#
# push:
# branches:
# - main
pull_request:
branches:
- main
jobs:
deploy:
if: |
github.actor != 'dependabot[bot]' ||
github.actor != 'github-actions[bot]' ||
github.actor != 'mergify[bot]'
name: Deploy to AWS
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: github-actions-session
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Set CDK Application Stage
id: stage
run: |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
echo ::set-output name=stage::"prod"
else
echo ::set-output name=stage::"pr-${{ github.event.number }}"
fi
- name: Create GitHub Deployment
uses: bobheadxi/deployments@v1
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{ steps.stage.outputs.stage }}
ref: ${{ github.head_ref }}
# - name: Bootstrap the CDK environment
# run: npx cdk bootstrap
- name: Diff?
run: npx cdk diff --context stage=${{ steps.stage.outputs.stage }}
- name: Deploy!
id: deploy
run: |
npx cdk deploy \
--require-approval never \
--outputs-file outputs.json \
--context stage=${{ steps.stage.outputs.stage }}
echo ::set-output name=env_url::"http://$(jq -r '.[] | select(.serviceloadbalancerdnsoutput).serviceloadbalancerdnsoutput' outputs.json)"
- name: Update GitHub Deployment Status
uses: bobheadxi/deployments@v1
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: ${{ steps.deploy.outputs.env_url }}