Skip to content

Commit

Permalink
Merge pull request #1 from KAZAMI-TECH/main
Browse files Browse the repository at this point in the history
chore: change build command to local npm run build instead building inside the Oryx deployer.
  • Loading branch information
kazami139 authored and GitHub Enterprise committed Feb 8, 2023
2 parents 9bfe342 + 99c2cf7 commit 51f09eb
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/azure-staticwebapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -36,12 +36,30 @@ jobs:
pull-requests: write # for Azure/static-web-apps-deploy to comment on PRs
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: [ Linux, ARO ]

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

name: Build and Deploy Job
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build And Deploy


- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- 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:
Expand All @@ -53,6 +71,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:
Expand Down

0 comments on commit 51f09eb

Please sign in to comment.