Skip to content

Commit

Permalink
chore: replace npm to pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
kazami139 authored and GitHub Enterprise committed Feb 8, 2023
1 parent 92731a3 commit 59d6938
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions .github/workflows/azure-staticwebapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ env:
API_LOCATION: "" # location of your api source code - optional
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
SKIP_APP_BUILD: true

permissions:
contents: read
Expand All @@ -49,15 +50,40 @@ jobs:
submodules: true


- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: npm run build --if-present
# - run: npm test

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Use pnpm to build
run: pnpm run build

# - name: post-build test
# run: pnpm test

- name: Deploy build artifacts to Azure
id: builddeploy
Expand All @@ -71,7 +97,7 @@ jobs:
app_location: ${{ env.APP_LOCATION }}
api_location: ${{ env.API_LOCATION }}
app_artifact_location: ${{ env.APP_ARTIFACT_LOCATION }}
skip_app_build: true
skip_app_build: ${{ env.SKIP_APP_BUILD }} #comment this out to use azure oryx build
###### End of Repository/Build Configurations ######

close_pull_request_job:
Expand Down

0 comments on commit 59d6938

Please sign in to comment.