🐛 Fallback mecanism on sdk JWT with last webauthn action #286
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🚀 Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- dev | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
CI: true | |
permissions: | |
id-token: write | |
contents: write | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
deploy: | |
name: Deployment | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
- uses: dorny/paths-filter@v3 | |
name: Check changes | |
id: changes | |
with: | |
base: ${{ github.ref }} | |
list-files: 'shell' | |
filters: | | |
deployRequired: | |
- 'packages/**' | |
- 'example/**' | |
- name: Set up QEMU | |
if: steps.changes.outputs.deployRequired == 'true' | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
if: steps.changes.outputs.deployRequired == 'true' | |
uses: docker/setup-buildx-action@v3 | |
- name: "🔨 Install dependencies" | |
if: steps.changes.outputs.deployRequired == 'true' | |
run: bun install --frozen-lockfile | |
- name: "🔨 Build the SDK" | |
if: steps.changes.outputs.deployRequired == 'true' | |
run: bun run build:sdk | |
- name: "👥 Configure AWS Credentials" | |
if: steps.changes.outputs.deployRequired == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::262732185023:role/github-action-deploy-role | |
aws-region: eu-west-1 | |
retry-max-attempts: 5 | |
- name: "👥 Login to Amazon ECR" | |
if: steps.changes.outputs.deployRequired == 'true' | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v2 | |
- name: "🔧 Setup environment" | |
if: steps.changes.outputs.deployRequired == 'true' | |
shell: bash | |
run: | | |
if [[ "${{ inputs.ref }}" == "refs/heads/main" ]]; then | |
echo "STAGE=prod" >> $GITHUB_ENV | |
else | |
echo "STAGE=dev" >> $GITHUB_ENV | |
fi | |
echo "Deployment stage : $STAGE" | |
- name: "🚀 SST Deploy" | |
if: steps.changes.outputs.deployRequired == 'true' | |
run: | | |
STAGE=${STAGE_OVERRIDE:-$STAGE} | |
echo "Deploying with stage: $STAGE" | |
bun sst deploy --stage $STAGE |