Skip to content

Try to fix pnpm

Try to fix pnpm #33

Workflow file for this run

name: NodeJS with Webpack
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [21.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Replace URL
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "import.meta.env.VITE_PAGE_PATH"
replace: "'https://peldas.github.io/ebook-reader-korean'"
regex: false
- name: Build
working-directory: ./apps/web
run: |
pnpm svelte-kit sync
pnpm build
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v4
- name: Upload Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
# location of the coverage artifacts
path: apps/web/build
deploy-coverage:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build-and-deploy
permissions:
pages: write
id-token: write
environment:
# environment created automatically by GitHub
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4