diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e462c4b..0ec6199 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,23 +10,29 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: 'frontend' + working-directory: "frontend" steps: - name: Checkout repository uses: actions/checkout@v4 # Task 1.1: + - name: Installation + run: yarn install + + - name: Run tests + run: yarn test deploy-infrastructure: name: Deploy infrastructure with Terraform runs-on: ubuntu-latest # Task 1.2: + needs: frontend-tests env: TF_VAR_my_name: ${{ github.head_ref }} ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }} ARM_SUBSCRIPTION_ID: ${{ vars.ARM_SUBSCRIPTION_ID }} ARM_TENANT_ID: ${{ vars.ARM_TENANT_ID }} - ARM_USE_OIDC: 'true' + ARM_USE_OIDC: "true" outputs: resource-group-name: ${{ steps.terraform-output.outputs.resource_group_name }} swa-name: ${{ steps.terraform-output.outputs.swa_name }} @@ -36,7 +42,7 @@ jobs: environment: prod defaults: run: - working-directory: 'terraform' + working-directory: "terraform" steps: - name: Checkout repository uses: actions/checkout@v4 @@ -85,7 +91,7 @@ jobs: - name: Setup Node.js environment uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: "20.x" - name: Authenticate with Azure uses: azure/login@v2 @@ -109,7 +115,7 @@ jobs: with: azure_static_web_apps_api_token: ${{ steps.get-api-key.outputs.swa_api_key }} repo_token: ${{ github.token }} - action: 'upload' - api_location: '' - app_location: 'frontend' - output_location: 'dist' + action: "upload" + api_location: "" + app_location: "frontend" + output_location: "dist" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +