From 28349bf111665db63278fe9951cf226e455688ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Wed, 8 Feb 2023 00:14:20 +0000 Subject: [PATCH] Update azure-staticwebapp.yml --- .github/workflows/azure-staticwebapp.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-staticwebapp.yml b/.github/workflows/azure-staticwebapp.yml index 60173d8..aa94288 100644 --- a/.github/workflows/azure-staticwebapp.yml +++ b/.github/workflows/azure-staticwebapp.yml @@ -21,9 +21,9 @@ on: # Environment variables available to all jobs and steps in this workflow env: - APP_LOCATION: "/" # location of your client code + APP_LOCATION: "dist" # location of your client code API_LOCATION: "" # location of your api source code - optional - APP_ARTIFACT_LOCATION: "dist" # location of client code build output + APP_ARTIFACT_LOCATION: "" # location of client code build output AZURE_STATIC_WEB_APPS_API_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} # secret containing deployment token for your static web app permissions: @@ -38,10 +38,18 @@ jobs: runs-on: [ Linux, ARO ] name: Build and Deploy Job steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - name: Build And Deploy + - name: Use Node.js 16 to build + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - name: Deploy build artifacts to Azure id: builddeploy uses: Azure/static-web-apps-deploy@v1 with: @@ -53,6 +61,7 @@ jobs: app_location: ${{ env.APP_LOCATION }} api_location: ${{ env.API_LOCATION }} app_artifact_location: ${{ env.APP_ARTIFACT_LOCATION }} + skip_app_build: true ###### End of Repository/Build Configurations ###### close_pull_request_job: