Skip to content

Commit

Permalink
chore: remove pnpm-lock and migrate to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
kazami139 committed Feb 18, 2023
1 parent 5989667 commit 7e8eba4
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2,482 deletions.
81 changes: 43 additions & 38 deletions .github/workflows/azure-staticwebapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Deploy EOEFANS LANDING to Azure Static Web Apps

on:
push:
branches: [ "release" ]
branches: ["release"]
# pull_request:
# types: [synchronize, closed]
# branches: [ "release" ]
Expand All @@ -36,57 +36,62 @@ jobs:
contents: read # for actions/checkout to fetch code
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: [ self-hosted, Linux ]
runs-on: [self-hosted, Linux]
environment:
name: 'Production'
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
name: "Production"
# url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

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



- uses: actions/setup-node@v3
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- 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
run: npm install

- name: Use npm to build
run: npm run build

# - 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 @@ -107,7 +112,7 @@ jobs:
permissions:
contents: none
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: [ self-hosted, Linux ]
runs-on: [self-hosted, Linux]
name: Close Pull Request Job
steps:
- name: Close Pull Request
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dist
dist-ssr
coverage
*.local
package-lock.json
pnpm-lock.yaml

/cypress/videos/
/cypress/screenshots/
Expand Down
Loading

0 comments on commit 7e8eba4

Please sign in to comment.