Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jenbcomp committed Oct 18, 2024
1 parent c9e03c0 commit f724487
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -36,7 +42,7 @@ jobs:
environment: prod
defaults:
run:
working-directory: 'terraform'
working-directory: "terraform"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -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
Expand All @@ -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"
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


0 comments on commit f724487

Please sign in to comment.